It varies according to the rules of each idol group and even the specific event. But generally speaking, you either buy a ticket directly or purchase some specific merch on site (usually laid out in front of the meeting booth area) and gain a ticket as a bonus.
That ticket is usually good for one photo, as the event is usually framed as a photo taking event. You queue up on front of the booth of the idol you want to meet, then when it's your turn you get to take the photo. During that time you may also get a bit of time to chat with the idol...how long depends, and usually for popular groups it's only a few seconds, plus a handshake (which is sometimes framed as the main objective instead) and that's it. For underground idols like Urumin it can be up to a minute or so.
Generally, the ticket is only good for that day and you have to get it onsite, except in the case of big idol groups with promotional campaigns before the event. You can get more than one, but since the ticket is actually used for a "photo", presenting multiple tickets usually just means you want all the photos at once and you don't get more time with the idol. If you do want more time, you'll have to queue again. If nothing else, it's to have courtesy for everyone else queueing up.
Speaking of courtesy, idol culture is pretty big on that, which is why while it's comically exaggerated, other fans going out of their way for OtaUru isn't that weird. Examples that we have already seen in this manga are true irl, like giving a ticket to someone you know is a fan of a certain idol if they may lose out on meeting them otherwise. Or in the live, pushing fans of a certain idol to the front when their oshi is in focus. I've heard at least one story when a guy who was known to be an idol's no.1 fan was carried to the front and hoisted up by the crowd, presumably all strangers.
Hardcore idol fans understand what things like that means for other fans. That's the more wholesome half of the culture ppl don't usually know about.