Gardens are the primary method of collecting crops for farming. They are a worldgen block that has a chance to drop from a few of the listed items when broken. They are stackable items. They spread over time in a manner similar to mushrooms in vanilla Minecraft.
Gardens are now picked up by clicking on them while crouching or can be harvested by breaking the block.
As stated above, gardens can spread to the blocks around them over time. The rate of spread can be changed in the config file. Gardens can spread up to 3 blocks away from their own (a 7x7 area around the original, as well as one block above/below them), and gardens will not spread if there are 5 or more of the same type of garden in this 7x7 space. This means that when farming gardens, you should keep the same type of garden away from each other so more can grow, but pack together different types because they do not hinder each others growth (so long as the 7x7 has free space for more to spread, of course).
As of version 1.8.9, gardens have changed from what is in detail described further below. There are now only 6 different garden types:
Anything listed below only applies to versions 1.7.10 and before
Berry Gardens are found in temperate biomes, such as Plains, Forests, and Mountains.
Desert Gardens are found in drier biomes, such as Deserts, Mesas, and Savannahs.
Gourd Gardens are found in temperate biomes, such as Plains, Forests, and Mountains.
Grass Gardens are found in Plains and Forests.
Ground Gardens are found in Forests, Taigas, and Mountains.
Herb Gardens are mostly found in temperate Forests.
Leafy Gardens are found in Mountains and temperate Forests.
Mushroom Gardens are found growing on fallen logs in Forests.
Stalk Gardens are found in temperate Forests.
Textile Gardens are found in Temperate Forests and Tropical Jungles.
Tropical Gardens are found in warmer areas, such as Savannahs, Jungles, and Swamps.
Water Gardens are found floating on the surface of large bodies of water, such as Oceans and Swamps.
Note, water gardens cannot be placed directly onto water like the crops that they give can, water gardens must be placed either onto grass like other gardens, or they may be placed on top of water indirectly from right clicking on an adjacent block to the surface of the water.
Attempting to place the water garden directly into the water will destroy the garden.
Additionally, water gardens can spread from land onto water.