This is where it all began.... back in the mists of time, musicians got together in alehouses, kitchens, living rooms, mud huts or whatever for the sheer joy of making music together. Thus Folk Music was born. This of course still happens...
Sessions are often themed with a style of music, Old Time, Blues Irish etc and the session leaders will guide participants through the session, however most session leaders will allow a level of diversion from the theme (if not complete anarchy).
If you want to perform at an Open Mic Session (with amplification) turn up with your instruments, catch the eye of the session leader and depending on how many people want to perform you will be told how many tunes you can do.
In a jam session the leader will ask around the group, usually seated in a circle, in some logical order "Fred, do you have a tune for us?" You can decline or start a tune and having announced the key and the name of the tune, usually you are allowed to play through the tune once before everyone else joins in. If it is well-known then that may not be the case and often the starter will look to other players (with an enquiring facial expression!) to take the instrumental lead on a refrain. This is often the case in a blues session where a tune can go on for many minutes, until the players get thirsty. Lastly, so everyone ends the tune together, rather than shout out often the starter will raise their foot at the start of the last time through the tune. Have fun!