Neurologists and neurosurgeons both specialise in the nervous system, and for many conditions — a first seizure, an unexplained headache, early nerve symptoms — a neurologist is the right first stop, since much of neurology is diagnosed and managed with medication rather than surgery.
A neurosurgical opinion becomes relevant once a condition is either surgical by nature (a brain or spinal tumour, an aneurysm, a herniated disc pressing on a nerve) or has stopped responding to medical treatment (drug-resistant epilepsy, some cases of Parkinson's disease). In practice, the two specialties work closely together: a neurologist often makes the initial diagnosis and refers on when surgery becomes a reasonable option, and continues to be involved in a patient's care afterward.
If you are unsure which is the right starting point, a general physician or your family doctor can usually make that call after an initial examination — there is no harm in starting with a neurologist and being referred onward if surgery turns out to be relevant.