If a lot of people show up, the manager will probably pick about 5 or 6 names at random. Don't take it too seriously if you don't get picked. Keep going back until you do. The ones who do get chosen go on stage and do 4-8 minutes before the regular show begins. If you're really bad, they turn the mic off in the middle of your act and escort you off the stage.
Comedy can be a very brutal business.
Besides comedy clubs, many bars, night clubs, and coffee shops offer open mic nights where aspiring stand-up comics can practice their craft. Once you get one or two laughs on stage, you'll get hooked. Next thing you know, you'll start tracking down any place that will let you perform. If they're not super-competitive, they might even tell you the truth. Once you've done the amateur night thing a few times, the next step is to determine whether or not you have the comic chops to go on.