Wetlands come in four main varieties, defined by two questions: is the water fresh or salt? And, is the wetland largely covered with grass and shrubs (a marsh) or trees (a true swamp)? Wikipedia gives bogs and fens as distinct types, but for most purposes those are just specific types of marsh.
A wetland forms when an area gets significant water input and slow water output. The water can of course come from rain, but it can also bubble up from the ground (rain in higher elevations trickles down and emerges from aquifers in the area of the wetland), or flow in from adjacent bodies of water like the sea, a river, or a lake. So those are your ways to get water; note that this means you can have a wetland in an otherwise dry-ish area, though that's uncommon. Consider the Nile delta, which gets enormous input of water and silt from the Nile.
Then there's output. Most well-watered areas aren't wetlands because of drainage. The ground slopes enough, even in generally flat areas, that water gathers in creeks and rivers instead of standing. So most wetlands are very flat, allowing water to stick around instead of quickly flowing away. In warm, dry, and/or windy areas, you'll also have a lot of evaporation, fighting the formation of wetlands. This is why flat dry areas end up as salt flats instead of marshes: water occasionally floods the area, but in a shallow layer it quickly evaporates, leaving salt behind, and there's no chance for lush plants to take root.
So most wetlands will be in flat areas with high rain or nearby bodies of water. If it's hot, they'll need a lot of rain or large bodies of water; if it's cold, you don't need much. Indeed, the boreal forests of Canada and Russia have vast stretches of cold bogland, because although there's relatively little rainfall there's also hardly any evaporation. Any little dip in the ground will fill with meltwater in the spring and stay water-logged until the fall freeze. Similarly, vast swathes of tundra are marshy during the summer thaw.
Whether a wetland is salty or fresh depends on where it's getting its water. Seacoasts will have salt marshes (e.g., the U.S. mid-Atlantic coast) or saltwater swamps (e.g., the mangrove swamps of Florida). I suppose you could have a salt marsh inland, if its water came through large salt deposits, but if so it may not have much life since there'd be no way for saltwater plants or animals to migrate to it. Strange life forms would eventually adapt to life there, like the thermophiles of Old Faithful.
The marsh vs swamp axis is a little tougher. Basically, an area will grow trees if there's sufficient precipitation relative to evaporation. The magic number is about 50 cm per year in the subarctic, 75 cm in the temperate zone, and 100 cm in the tropics. A little less than that and you get shrub or scattered trees near rivers (prairie, savannah), a little more and you get open woodland - or, for your purposes, you get a swamp instead of a marsh. There are additional factors (soil depth, soil fertility, grazing from large animals), but the main one is rainfall. If you want a marsh in a rainy area, you can declare the soil is too exhausted and the migrating muck-beasts eat any saplings. If you want a swamp in a relatively dry area, you can declare the soil to be richly endowed, and the trees to be very hardy and slow-growing, able to cope with dry spells.
A few more notes:
- Wetlands can be seasonal or year-round.
- They're a pain to traverse, since if you try to walk you'll hit thick mud or deep pools and if you try to boat you'll hit thick mats or sandbars.
- They can be drained even with medieval technology, and usually will be when mankind encroaches as they're not suitable for growing crops.
- They are usually teeming with plant and animal life, because of the omnipresent water, but they needn't be: without an inflow of fresh nutrients a wetland can be a tough place to get nutrients. Such wetlands are like tropical rain forests: they have vast amounts of vegetation which accumulated very slowly, and if cleared will not be good for agriculture without massive fertilization of the soil.
- The growth of vegetation combined with the lack of oxygen to support decay means wetlands can accumulate large amounts of carbon. This starts out as peat and eventually becomes coal.
- This may be surprising: for pre-industrial societies, marshes were a key source of iron ore! Rainfall in iron-rich uplands would flow down to wetlands and accumulate, aided by bacteria, into lumps of hematite. In England and Wales, people would poke through the moors periodically looking for these deposits and take them to the blacksmith for refining.