Find the slope of the hill with a stake at the top, a tall pole at the bottom and builder's twine stretched between them. Level the string with a line level.
Measure with a tape measure the height from the ground to the string on the pole and the distance from the front to the back of the shed area. Base the foundation on these figures; if the back is 10 inches higher, for instance, the rear of the foundation must be 10 inches taller than the front.
Create a foundation with precast concrete piers or full concrete blocks for a difference of no more than 16 inches or two blocks high. Buy piers with metal supports installed if possible; otherwise plan to lay beams on top of the piers or blocks.
Set nine blocks in place, one at each corner, one in the middle of each side and three down the center of the shed area. Measure corner to corner and adjust blocks until those diagonals are the same and the foundation is square.
Lay a long board across the side piers and use a level to get it level. Adjust the center piers to fit; remove dirt or add smaller blocks as necessary to get the center blocks to the level height.
Check the level across the width and across the diagonals, from corner to corner, and make adjustments until the foundation piers are level in all directions.
Set 4-by-4-inch or 6-by-6-inch beams or supports like railroad ties on top of the piers. Fasten beams to metal supports if using that style; lay ties on top of the piers or blocks.
Double check the level once the beams are in place and adjust foundation elements as required or put wooden shims under ties or beams to get the tops level.
Build a wooden floor of 2-by-4-inch lumber and plywood for a wooden shed or assemble the floor elements of a metal or vinyl shed, based on the manufacturer's directions. Set any type of floor frame on the foundation and use a long board and a long level to get it level, in all directions.
Adjust the foundation elements or use shims under the floor frame to get the floor level.
Make wooden walls for a wood shed or put together wall sections of a metal or vinyl shed; these techniques will vary with the type of shed. Follow the assembly directions for metal or vinyl sheds.
Erect the walls and fasten them to the foundation beams with nails or screws and a hammer or screw gun, depending on the type of material. Install a roof with a shed kit or build one from wood for a wood shed.