The flash has a sensor that determines the correct exposure. They normally also have a manual mode that puts out full power (some have fractional power settings), and you determine the aperture to use based on the cameras-subject distance.

Modern p-ttl flash uses a short pre-flash that measures the light within the camera, and then provides the proper reading through the lens (as such, ttl). Most often this works well, but it can on occasion result in a blink or droopy eyes, or if the flash isn't seated quite right you get a wrong exposure (due to smaller extra connections).

Auto flash measures the light with a sensor on the flash. Although slightly less precise, it can be a bit more dependable overall when comparing single flash situations.

If you want to look at a good guide to Pentax p-TTL flashes - that also mentions auto mode units, check out Matt Miller's site:

It is worth it - in my opinion - to pay a bit extra for auto to go with pTTL (or go the cheap route and just get a non-TTL flash). Auto is a lot easier and more precise than manual output using ratios.