To prepare the ground for a foundation, start by clearing the area of vegetation, debris, and unstable soil. Compact the exposed soil and add several inches of gravel as needed to create a flat and stable base. Be sure to excavate below the frost line and plan for proper drainage.