Don't let anyone tell you that surfing is a lawless free-for-all without basic structure or rules. Most importantly, you must abide by the heaviest rules of all...the rules of nature. So sit and watch before you paddle out since conditions can quickly get out of hand. Rip currents and submerged reef can be deadly.
The next level of rules are surfing's societal norms that have been established over decades of surfing interaction. It's a way to insure a certain order in the water.
The first and most basic rule of surfing is that the surfer who gets to his/her feet first and is closest to the whitewater (the breaking section of the wave) has priority (in theory but not reality, that surfer owns the wave).
Sometimes, however, two surfers get up at the same time on an unbroken wave. In this case, priority gets murky, and hopefully basic human decency takes over. Maybe a compromise in which the surfers ride the wave together or go their separate ways can be reached, but be assured that confrontations do occur in lineup. Remember, no wave is worth a fight, so be the bigger person and let it go.
The Golden Surf Rule:
Never Drop In If you don't want to be an outcast or a target for aggression, never drop in on another surfer. If a surfer is up and riding, that wave is his/hers. Taking off in front of that surfer is a serious breach of surfing's most coveted rule.
Paddlers or Surfers:
Who's Most Responsible? Most surfers say that it is the paddler's responsibility to get out the way of the surfer riding the wave. This is true for the most part, but safety is the real priority. This means that the surfer on the wave (the one who has the most maneuverability in this situation) should exercise caution as well even if it means missing a solid section of the wave.
Source: Basic Surfing Rules by Jay DiMartino at About.com