There appear to be no less than six commonly used ways to measure the length of a boat. Most of the discrepancies have to do with whether stern platforms and bow pulpits are "integral parts of the hull" or are bolted on separately.
Units: Linear measure (usually metres/centimetres or feet/inches).
Length overall (LOA)
The length from the forward tip of the stem to the aftmost point on the hull. Usually includes any bow or stern appendages that are a structurally integral part of the hull (eg. a swim platform or anchor pulpit moulded as part of the hull), but excludes bowsprits, boomkins, bolted-on pulpits and stern platforms, or other appendages that aren't an integral part of the hull itself.
Length waterline (LWL)
The length of the design waterline, i.e. the length of the part of the boat that's in the water when she's loaded exactly to the waterline shown on the plans.
Length between perpendiculars (LPP)
The length from the forward point of the design waterline (same as for LWL) to the centre of the rudder stock. Used mainly for large ships, and rarely mentioned aboard anything under a hundred feet or so.
Length on deck (LD, LOD)
The length from the foremost point of the deck to the aftmost point of the deck; it leaves out reverse-sloping transoms and most types of integral pulpits.
Length of hull (LH)
The overall length of the hull itself. Defined similarly to LOA, but usually excluding bow pulpits.
Depends on which rating rule your boat is subject to. This is usually some combination of LOA, LWL and various parameters describing the shape of the bow and stern overhangs.
Which one to use?
For marina fee purposes (they're measuring)
Marina administrators often like to use the total length of the boat, including bowsprits, boomkins, pulpits, protruding sterndrives, the trailer tongue, and other length-extenders that would be considered "cheating" if you used them to describe your boat to a friend. That 18-foot runabout? 22'6" to the boatyard, once you add the tilted-up outboard and the trailer tongue.
For marina fee purposes (you're measuring)
If you're being billed by length, you'll try to low-ball the measurement. For a powerboat, LPP is usually the shortest, so you might start there. That might seem suspicious, though, so LWL and LH are the next to be presented. Eventually, you and the marina manager will grudgingly agree to use LOA, at which point a long and drawn-out argument will ensue over whether that anchor pulpit really is "integral to the hull".
In a builder's marketing brochure (model number, etc.)
It could be any of a number of quantities of questionable origin. Popular ones include "Take LOA in feet, round up, append two random digits". Or "Take LOA in feet, add swim platform but not anchor pulpit, round to nearest inch, state as FtIn". Or, "Take LOD in dekametres, add pulpit but not swim platform, round to nearest multiple of five".
At Marsh Design, the model number is the LOA in centimetres, using the standard definition given above.
When comparing performance
That would be LWL. For speed and seakeeping, you care about how much boat is actually in the water. That is, after all, what the waves see, and it's the length used to compare Froude number or speed/length ratio.