Essentially it tests how tight the evap system is.
First, it closes the evap system (including the vent valve, fuel tank, canister, evap lines, etc.) except for the purge valve on the engine. With the engine running the purge valve opens to allow engine vacuum to draw down the pressure (pull a vacuum) on the closed system.
At that point a system without big leaks should cause the fuel tank (or system) pressure sensor to sense the pressure change (going negative as vacuum) and report it to the engine computer, and vacuum should continue to build.
Once the purge valve is commanded to "seal," the entire system should be closed, and only a small bit of vacuum decay should happen over a little time. The changes to the negative system pressure (e.g., decreasing vacuum) should be reported by the fuel tank pressure sensor.