There are many ways to measure your body fat percentage, and even the best methods aren't exactly precise. You might score a 18 on one method and a 24 on another method.
The most common body fat test uses skinfold calipers thats designed to measure the fat on your body in certain points. The calipers pinch three to seven different sites on your body, such as the triceps, abdomen, your thigh, your hip, and your scalpula( back of shoulder). There is a gauge on the calipers that measures the thickness of the fat. This measurement is recorded and put into a formula to give you your body fat percentage. The person testing you, should be sure to take each measurement 2-3 times to make sure of the proper measurement.
Skinfold calipers have a margin of error of 4 points. Meaning that your body fat percentage could be 4 points higher or 4 points lower. Also get tested before you workout due to the blood that travels to your skin to cool you down. This can cause your skin to swell, causing you to test fatter than you really are.