How to Fix Compacted Soil
To fix compacted soil, which is soil that has little to no air space, break it up to make it hospitable for your plants again. Start by shifting livestock, machinery, vehicles, and foot traffic away from the compacted area to give the soil a rest. If you use the compacted area for farming or gardening, move your plants somewhere else for at least 1 growing cycle. Instead, plant a cover crop, like winter wheat or ryegrass, to allow the roots to break up the soil. For smaller, grassy areas that are compacted, use a small metal garden fork to poke holes in the soil so air, water, and roots can enter the area. However, when tackling a larger area, use a rototiller with an aeration attachment.
Discover the cause of compaction. Several obvious reasons cause soil compression, such as heavy machinery and foot traffic. Less obvious reasons include over-tilling the soil, leaving the soil bare to the rain, or working with wet soil. Knowing the reason for compaction helps you take precautions to limit it now and avoid it again in the future. Reroute traffic. Shift livestock, machinery, vehicle, and foot traffic away from the compacted area. Provide alternative routes and block off the area with barriers such as signs and fences. Do this long enough to give the area a rest and consider protecting the area permanently by keeping paths, roads, or stock runs to restrict traffic to one area. Try to designate already degraded soil for paths and household construction to limit the spread of compaction. Reduce cultivation. If you use the compacted area for farming or gardening, move your plants somewhere else for at least one growing cycle. Instead, try substituting a cover crop at the end of the season, such as winter wheat or ryegrass. The roots break up the soil, and then next season you can mow and turn it in the soil with a spade or tiller to further aerate. A light, non-machine compaction can often be cured by letting the soil freeze and thaw through one growing cycle. Tillage radishes can help with severe compaction with their large roots, which work deep into the soil and leave space after they decay. Punch holes with a garden fork. For small, grassy areas, a small metal garden fork or sandals with spikes in the bottoms are enough to poke holes in the soil. Aeration holes let in air, water, and roots. Start on one side of the lawn and push the fork into the ground in one direction every few inches or eight to ten centimeters. You may need to repeat the process in a different direction to achieve aeration. Dig up compaction. Loosen the compaction by digging up two or three inches of dirt with a shovel. Take a spade and divide the soil into small rows about a foot wide. Dig small trenches behind these rows, then use the rows of soil to replace the dirt removed from the trenches. For poor soil, you may need to dig deeper, about two spade-lengths, to help aerate the top layer and mix it with better soil. Get a rototiller with an aeration attachment. Buy or rent a rototiller from a lawn and garden or home improvement store and consider getting an aeration attachment for it. Run the tiller over the soil, then run it over again two or three times, using it to cut deeper. Tillers aren't as effective on large areas as coring machines since they only break up the top layer of soil. Tilling too regularly actually contributes to soil compaction, because it creates a hard pan of soil below the tilled area. Remove soil cores. Plug aerators are heavy machines that are useful for large areas of foot traffic such as lawns or fields. Rent the machine from a home and garden store, then set the machine against moist soil. As it rolls across the soil it will pull out a core of dirt, then move it two or three inches away. Repeat throughout the area. Let the removed soil plugs dry before breaking and scattering them. Badly compacted areas require multiple passes of the aerating machine. Mark off any areas where pipes and roots run close to the surface. The aeration plugs should only be a couple of inches deep, but it can still damage these structures. There are also hand held aerators which you push into the soil manually and then move, which may be better for smaller lawns or gardens. Replace the soil. This is an intensive solution and is mostly used for small areas to reintroduce grass. Dig up the compacted soil by hand or by machine. You can gather the soil into a planting mound nearby or bury it in good soil. Bring in new topsoil and spread it over the area. Check with your lawn and garden or home improvement store for a soil that has the qualities to nurture plant growth. The larger the plant, the more replacement soil it will need to flourish. Trees and shrubs require 15 inches to three feet of replacement soil. Let soil dry before use. A particular time of danger is when gardeners go out to plant in the spring. You will be eager to go out and work, but immediately after rain, the soil is too wet. Working with soil when it is too wet causes it to lose structure and collapse in on itself. Instead, wait until the soil is dry and crumbly. To test for soil ready to be worked, form a ball of soil in your hand. The soil should break apart when worked and when dropped. Avoid overworking the soil. Aerating is beneficial for soil, but tilling it too often keeps the soil from settling. Good soil forms small clumps after being tilled once. These clumps are the pockets that give the soil the structure that permits air and water to penetrate it. It can be tempting to till the soil again and again, but this collapses the soil. Till the soil only before planting and during occasional aeration. Even consider trying no-till gardening or farming. Some studies have shown no-till farming reduces compaction and increases soil productivity as compared to tilling. Work in organic material. While you aerate the soil, add compost or mulch. Yard waste, wood chips, or even food scraps are a cheap option that can be added to lawns, gardens, and even around trees to refresh the soil. Make compost or buy it at a lawn and garden store. The organics are broken down by organisms such as earthworms that aerate the soil. For badly compacted soil, add a 50% compost blend to regular soil and 25% in sandier soils. Avoid amending soil with inorganic material such as sand if possible. Too little sand worsens the compaction. Limit traffic pressure. Pressure against the soil is a common way to compress it. Avoid riding lawn mowers and use vehicles with wider tires, adjusted air pressure in tires, and less weight on axles. During construction, limit vehicles to areas where the soil will be covered such as by paths or patios. Also, covering the soil with mulch and ¾-inch thick plywood or synthetic substitutes help reduce the pressure on the soil when traffic cannot be avoided. 
Discover the cause of compaction. Reroute traffic. Reduce cultivation. Punch holes with a garden fork. Dig up compaction. Get a rototiller with an aeration attachment. Remove soil cores. Replace the soil. Let soil dry before use. Avoid overworking the soil. Work in organic material. Limit traffic pressure. 