When I first started surfing, I had a *conceptual* understanding of what a lineup was, but I was actually really scared of being in one.
I learned to surf in Bali, and the beach I was on had like maybe 2 other people on boards. Also the waves were like 2ft. I was genuinely a bit scared for when I would be at a normal beach, surrounded by people, and having to figure out when it was my turn.
The way a lineup shapes out is different depending on the beach, where on the beach you are, the wave size, and the way the waves are breaking. The lineups will form for each break at the location where entering the wave is optimal. It's the best location to start paddling from, but also if you didn't want to catch the wave, you wouldn't be dragged to shore. So if you were to go out by yourself, and you weren't just surfing the white water, you would sort of naturally go to where to "lineup" would be if there were other people out there.
If you're too far out into the ocean, you probably would notice that the wave doesn't have enough power, or you're just not strong enough to paddle fast/hard enough to catch the face of the wave properly. If you're too inside the wave, too close to shore, then you'll notice that waves are just crashing on top of you and you're getting thrown around.
Okay so now you know where the lineup is. Now what?
Rule #1: Just because you can catch every wave doesn't mean you should. It would be super rude to paddle out for every wave, and take it from other people. In reverse, how would you feel if every wave you paddle out for the same person (or people) just snagged them all? It's poor etiquette.
Rule #2: The people that have been waiting the longest should be the ones to paddle for the coming wave. You might notice that as time goes on, the lineup shifts around. People will be changing their position in the water. This has to do with the tide changing, but also allowing different people to be in the best spots. When I catch a wave, and I paddle back to the lineup, I'll go farther out into the ocean - let the next few sets take the other surfers more inside, or to the shore. Tada, now I have room to get into the best position for the next set.
Rule #3: When paddling back into the lineup, please please do not paddle out in front of where the other surfers would be riding the wave. Paddle wide, outside of the break. Give the surfers room to navigate around you if going wide isn't an option. If you need a break, either chill in the white water, or on the beach. Don't just sit in the water in between the shore and the lineup - you or the surfer could get hurt. Surfers have the right of way, but we don't want to hurt anyone! If for some reason a collision happens, everyone involved should check on each other.
Rule #4: The first person who pops up for the wave gets the wave. Again this is why you want everyone to have a turn. Because no one likes a wave hog. Party waves (when more than one person catches a wave) can be super fun! But I've seen a lot of people almost get into fights because one person wanted the wave to themselves. I only Party Wave with my friends, to avoid that conflict.
Now this last one isn't a rule. But make friends with the people around you. It makes all this stuff I just wrote make a lot more sense. Just this past weekend I made some session friends, and we all agreed we would be super chill party waving, so we all went for the same waves! The beach I surf at can get crazy busy, and you have some people who are wave hogs, some who are just plain rude, and some who don't understand the lineup rules. So I hope this helps!
Being in the ocean is an amazing experience, and we are all there to have fun! Always check on each other, apologize if necessary, and just do your best!