Grading soil next to the foundation involves creating a slope away from the building to direct water away from the foundation, reducing the risk of water pooling.