If someone passes out in front of you, the first thing is to make certain that they are breathing and conscious. If not, you should immediately call for emergency help, since the most important thing will be to get experts on the scene who can manage a medical emergency.
If the person is breathing and conscious, then you can first make certain that they have room, creating space around them so that they are not crowded with people. Helping them onto their side and supporting their head with a pillow or article of clothing can also help. In most cases, they should also be evaluated by a medical professional as soon as possible, especially if there is any concern this might have been a seizure or other serious medical event.
Encouraging your friend to get followup as soon as possible with their primary care doctor
is another good thing that you can do.