Porosity is the ability of soil to drain excess water freely. Porous soil has organic and inorganic ingredients in different sizes that don't stick fast to each other. This looseness allows the water to flow through. Sandy and gravelly soils are the most porous soils. Clay and silt soils, with their tiny particles that stick together, are the least drained and most waterlogged. Porous soils are abundant in tiny air pockets.
Healthy, porous soils drain freely, moving excess water away from plant roots. Most plants in perpetually soggy soil decline and die very quickly. Porous soils rich in organic matter not only drain excess water, they also store moisture and nutrients for the roots as they are needed. Porous soils are also well aerated. This guards against root rot fungi, provides necessary oxygen to the roots and allows earthworms to do their work on soil improvement.
Average garden soil should be amended with organic matter to improve structure. Garden compost, composted manure and soil conditioner (finely shredded bark) create a balance of drainage and moisture retention. Leaf mold (partly decomposed shredded leaves) is an excellent, economic alternative when large quantities are needed. Heavy soils -- clay and silt -- can be lightened with sand or fine gravel, as well as soil conditioner and compost.
Think of soil improvement as a long-term building project: each time you improve a planting hole or add mulch contributes to the long-term health of the soil. Using composted manure as a mulch or mixing it in as an organic fertilizer when needed adds nutrients to soils and improves structure as the weather and earthworms mix it into the soil. Sometimes a wet site can't be improved. If you have such a site, don't fight it. Look for plants that like soggy soil.