Farming is only possible on mud and soil. Any terrain can be made muddy, and therefore suitable for farming, by dumping water on it. In Dwarf Fortress, 'Irrigation' is used as a fancy word for dumping water onto terrain that isn't useful for farming, in order to make it so. Once your floor is successfully muddied no further irrigation will be required, unless you somehow remove the mud (by building a constructed floor, for instance).
Any amount of water dropped, pumped, or otherwise transported onto a tile will leave behind at least 'a dusting of mud', and this is sufficient for farming. Farm plots cannot be built on terrain with a water level of more than 1/7, and more mud has no apparent effect on farm output, so it's best to use a minimum of water to irrigate.
Irrigation is especially useful in biomes with little soil, and deep underground. However, no amount of irrigation will make it possible to grow surface plants in a hostile biome, such as mountains. This is a matter of climate, not soil conditions.
Farm plots can be built on unsuitable ground but doing so will display a warning message. If even a one tile of the plot lacks mud or soil, the entire plot will be unusable.
Magma cannot be used to irrigate, as it does not leave behind mud. It's usually best not to confuse molten rock and liquid water, although the use of both in tandem may help with schemes to irrigate glaciers.
 Easy Irrigation
At its simplest, all that's required for irrigation is a water source, a drop-off point, and a dwarf with a bucket.
Very little land is required to provide all the farm field resources a fortress needs to survive and prosper, so this method should suffice in most cases. Of course, we have many other methods documented here for more ambitious sorts.
 via Buckets
This method relies on activity zones, as water for irrigation can't simply be dropped on the ground, but must fall from the level above.
Step one: Designate a water source activity zone over the edge of a body of water. In a saltwater biome, a well must be constructed, instead.
Step two: Dig out or construct a drop-off point just above where you want your farms to be. This most often takes the form of a balcony, catwalk, or scaffolding. Alternately, channel out a shaft and/or staircase all the way up to the surface. Water can safely fall any distance.
Step three: Designate a pit/pond area at the drop-off point, or several if you'd prefer speed over conservation of buckets. By default, these zones are pits, make sure to switch them to ponds, and to remove them once you have all the mud you need.
 via Murky Pool
Most areas contain murky pools, full of stagnant water. Though unpleasant to drink, in DF terms it's as useful as any water for irrigation. Like any other body of water, it can be used as a source for buckets, but the limited quantity also helps a simple plan to dig into or around it, and drain it out to create farmland.
The final water level must be less than 2/7 in order for the water to evaporate and provide access to the muddy tiles for farming. When using this method, it's easier to use smaller pools.
There are two approaches to reducing the final water level, without using pumps. One is to leave plenty of room. If the area to be irrigated is 5-6 times the size of the pool, the water inside will evaporate on its own, even in temperate climates. The other way is to leave a route for the water to flow out. If the pool and the dug out area are separate, channeling can be used to connect them with no danger of drowning.
 Complex Irrigation
The following methods of irrigation take longer to build, but they can be more powerful, better-looking, and, of course, much more fun.
 via Screw Pump
A screw pump can be used to lift water and dump it into a chamber directly next to the water source. There are many ways to go about this, but one particularly simple, easy, and safe method requires a chamber dug out or constructed next to a body of water, with an outlet to allow it to drain back to its source. If the water the pump is free to collect water to spread inside, the water is contained by barriers, and water in the area is free to drain out, nearly any size area can be irrigated quickly and without danger.
This method is most useful around rivers that pass by or through hills, or through canyons, as irrigation isn't much use on most outdoor tiles. If terrain at a higher elevation than the river isn't available nearby, water can drain through a tunnel down to the caverns or toward the edge of the map, instead. Although the edge of the map cannot be dug out, it can be smoothed and carved into fortifications. Fortifications allow water to pass through, providing easy drainage at any depth.
Here's one example of this method:
 via Reservoir
Water reservoirs can be used as an intermediate step in any irrigation plan. This requires a large source of water to be of much use. Using reservoirs effectively involves some calculations, a worked example is shown below.
For this example, each 7x7 farm plot needs:
Also needed is:
- 2 Mechanisms for the levers
- at least one additional door (if you have enough time to set up a wall or floodgate as well)
Here is the pattern:
After the pattern has been dug out, the tiles for each hatch are channeled out. Then, the hatch covers are placed and linked to the first lever.
Floodgates are placed and linked to the second lever. To start the irrigation, channel out the last tile to the river / murky pool. Engage the floodgate-lever to fill the reservoirs and disengage it once they're full. Finally, pull the lever for the hatches to release the water to the lower level.
This reservoir contains 70 units of water (10x7). 9 units of water are lost to the ground of the reservoir (61 left). Roughly 10 units evaporate while spreading (~51). The water should be just enough to cover the whole farm plot and evaporate quickly.