Quick answer
Look for an L or R stamped on the pedal axle or the wrench flats. If there is no marking, check the thread direction. The left pedal has a reverse thread, so it is threaded the opposite way to the right. The right pedal goes on the drive side, the side with the chainrings.
Look for the markings
Most pedals are marked with an L or R on the axle or the wrench flats. This is the quickest check, and it is easiest to see once the pedal is off the bike. Worn paint or a dirty axle can hide the letters, so wipe the axle clean before you decide.
Check the thread direction
The right pedal has a standard right-hand thread. The left pedal has a left-hand thread. Hold the axle so you can see the threads and look at the direction they slope. Right-hand threads slope up to the right, and left-hand threads slope up to the left. If you have a pedal you know is correct, compare the two so you are reading the slope the same way.
Some left pedals have a groove cut into the axle just before the threads. This is not true of every model, so do not rely on it alone.
Use the drive side
The right pedal goes on the drive side, the side with the chainrings and the cassette. The left pedal goes on the other side. If you know which side the crank is on, this gives you a check on the pedal you are holding.
Why the threads run opposite ways
The left pedal turns in the direction of pedaling when it is installed. A reverse thread means that turning pushes the pedal tighter, not looser. In theory, this keeps the left pedal snug as you ride, as long as its bearings turn freely.
If you fit one on the wrong side
A pedal forced into the wrong crank usually shows up as early binding, a gritty feel or a pedal that will not go in straight. Stop straight away and pull it back out. Check the markings, then start again. Forcing it can cross-thread the crank, and a damaged crank thread is much harder to fix than a pedal in the wrong place. For the right way to start a pedal, see the guide on how to avoid cross-threading a pedal.