The best systems
For navigation, we essentially have two systems at our disposal: natural orientation, which as the name suggests is provided by nature itself, and the compass (which we'll discuss shortly). In both cases, it's crucial to calculate the distance covered, to position ourselves and know the approximate distance from the starting point when beginning our return.

Calculating distance covered
Time calculation: In a swimming pool, with full diving gear, time how long it takes you to swim 100 metres. Perhaps it took two minutes? Well, now you know that at the same pace and without stopping, every two minutes you'll have covered 100 metres at sea.
Fin kicks: Follow the same steps as above, but this time concentrate on counting how many fin kicks you need to advance 100 metres. Each upward and downward fin movement counts as one unit. Apply this at sea and you'll know that "x" fin kicks equal 100 metres covered. Both this system and the previous one are reliable in the absence of currents. If currents are present, we'll need to increase or reduce the time, depending on whether we're swimming against or with the current respectively. When the current runs lateral to our direction of travel, in both cases we must calculate for drift (a correction made by "closing" our return direction more or less towards the current depending on its strength).

Air consumption: If the dive we plan to do has a flat profile (at the same depth), this is very useful. When our air supply is approximately halfway depleted, we'll begin our return. Remember that the return journey is always much quicker than the outward one, as we're less distracted and shouldn't need to use the safety reserve. We can also use this system for underwater routes by changing direction every "x" atmospheres consumed, creating geometric shapes like squares or triangles that bring us back to the starting point.
Marked line reel or tape measure: This is the most accurate but also the most cumbersome method - we'll know exactly how far we are from the starting point. By reeling in the line, we'll locate the exit. Essential for wrecks or caves.
Forward arm strokes: Uncomfortable but very precise - test this on a bottom you've previously measured (a pool won't work here, as you use arm strokes along the bottom to move). Avoid damaging the seabed with your strokes.
Lateral arm strokes: This system is very useful for locating small areas of interest on cliff walls. Combined with your dive computer that records depth variations every ten centimetres, your positioning will be perfect.

Observe and remember
Having analysed the different distance calculation systems, let's now use the means that nature itself provides for navigation. They've always been available to you - we're just going to describe some of them. Use them individually or several at once, and add any others you find useful depending on your dive location.
Anchor line: If beginning your dive from a boat, note the colour and thickness of the anchor line during descent. Observe the length of chain section and the anchor type, as well as the seabed where it's landed and the depth. This is often very helpful in areas frequented by divers, to avoid surfacing at the wrong boat. It's also useful to note the shape of your boat's hull underwater.
External light: The sun moves slowly and makes an excellent reference point before starting your scuba diving. To return to the starting point, take the opposite direction to your initial solar reference (e.g.: sun behind you, sun in front). For night diving, lights from boats, hotels etc. can serve as references, as can the moon - though this planet changes its trajectory quickly.

Currents: These are translational water movements, generally in one direction. Always begin your dive against the current and return with it.
Sounds: Although they travel faster underwater than in air (making direction hard to discern), sounds can be helpful, particularly when approaching shore.
Marine life and flora: These typically indicate certain depths and directions that may vary by dive location. For example, on Spain's Costa Brava, colourful gorgonians are only found on north-facing walls.

Tips for different dive types
Depending on the seabed type, we'll use different diving systems to simplify our return. Below we describe several systems that will ensure trouble-free returns.
When diving on sandy bottoms, you'll notice that at shallow depths, the sand forms lines parallel to the shore. Crossing these perpendicularly means heading out to sea or back to shore; following them means moving parallel to shore. A depth gauge reading and observing the marks we leave behind will effectively show our position. Note that beyond certain depths these marks disappear, leaving a completely smooth bottom where a compass becomes essential. Approaching shore, the lines get closer together; moving seaward, they space out.

When diving along cliff walls, begin at the deepest point with the wall on your left/right side. To return, simply ensure the wall is on the opposite side (opposite shoulder) from your outward journey, gradually ascending while following the wall.
When diving on unstructured rocky bottoms, note small details like foreign objects (cans, bottles), their position and depth.
When passing rocks, coral, mounds etc., turn around and note how the seabed and rocks (their other sides) will appear on your return. Note significant flora/fauna areas - they can help guide you back. Remember all these details.

When diving in "blue water" (pelagic fish spotting or simply enjoying the sensation of "flying" through water), navigation is very difficult - you can only rely on sunlight, bubbles and your compass.
For night diving enthusiasts, remember your visibility is limited to torchlight range, making natural orientation systems impractical unless you significantly reduce your night dive distance.
Plan your routes before diving, initially choosing the simplest ones. Challenge yourself to be highly observant - you'll find nature provides sufficient means to find your way back, though sometimes we have no choice but to use a compass or guide line.

In any case, your navigation skills will only improve with practice. Observe carefully, and don't blame others for navigation errors. Anyone can get disoriented underwater in unfamiliar areas.