The "passing out" type of attacks are seen in mainly two types of diseases, one is cardiovascular problem and other is neurological problem.
First of all I would like to advice you not drive any vehicle to avoid any accident if you get attack in future.
You are advised to drink plenty of fluids and take proper rest as excessive exertion can give rise to these type of attacks, also get your blood test
done, to rule out any blood problem.
You can visit nearby General Physician/ Neurologist
to get your neurological examination done, like knee and ankle reflexes, pupil size and reflex, etc. and follow as advised .
hope my info helped you
Dr Hari Om Chandrakar