Both tests remove the sparkplug and either screw in or press in a rubber fitting:
A compression test tests the maximum amount of pressure the cylinder puts the air and fuel under. By pull starting the saw.
In a leak-down test the tester; first rotates the motor so that both the valves that let in fuel and let out exhaust are closed; second fills the cylinder with compressed air; lastly measures how quickly the air passes though the small spaces between the cylinder walls and the rings and the valves and their seats.