Primarily, while they are unconscious, lay them in the recovery position. If you don't know it, then look it up.
If you know the reason why they fainted and they weren't out for more than 90 seconds max, then offer them a glass of room temperature water...... Best advice I can give.
If say for example they are diabetic and they pass out then that is a totally different ball game.
Blood glucose levels below 4.0 and above 8.0 can be potentially dangerous and lead to hypoglycaemia or hyperglycaemia, both of which can lead to comas and death.
If someone is diabetic and passes out, take their BM's and call for emergency medical help straight away.