Even though surfing is an individual sport, surfers are a community of people who share the waves. Learning and following the unwritten code of conduct is especially important and profitable for beginners. It not only helps prevent accidents, but also shows your respect for your fellow surfers.
Some rules of the code are simply about being polite. For example, wait your turn in the lineup. Beginners, who usually ride longboards, may be tempted to break this rule and use their larger board's paddling and speed advantage to outrace surfers on shortboards to the take-off zone. Don't do that.
Also, waves are one-to-a-customer. It's considered poor form to drop in, or catch a wave, when another surfer is already riding it. Sometimes beginners drop in, not realizing the wave's already in use; pay attention to what's going on around you.
Other rules are peculiar to surfing culture. For example, respect an established surfer's spot and seniority. Follow the vibe of the lineup. Early-morning surfers trying to get in a session before heading to work may be less tolerant of beginners. Be especially deferential to this crowd. The after-work crowd may be more relaxed and boisterous. Join the fun, but pay extra attention to the traffic. A surfing community is like a neighborhood. Balancing friendliness with responsibility is the best way to get in, and stay in, their good graces.