How does a gym membership work?

#1
I would like to join a gym and wondering how it works? Can you pay by the month? Do you have to pay a membership fee? Can you pay by the day?
Tks