Unlike RL humans, dwarves do not care whether they're moving vertically or horizontally, so I think one tile is one tile, regardless of direction, but I believe diagonal movement is calculated as such, but without regard for whether that diagonal is vertical or horizontal. The path finder finds the "shortest" path, taking movement restrictions into considerations (you can set up those, but they default to normal cost everywhere, and DF does not set up any movement restrictions on its own).
Pathing does not allow climbing or swimming for normal critters, but pathing will set up paths through variable depth water if the water level at the time of pathing is 3 or below, and will likewise path through tiles onto which magma sloshes if there's no magma at the tile at the time of calculation, which can lead to dorf incineration when magma sloshes onto to tile when the dorf is on it (the dorf won't step into magma, though). Natural climbers are probably handled differently, and I'd suspect natural swimmers are as well. Path finding for fliers is buggy.
As bloop_bleep said, a burrow is an area (not necessarily contiguous) that says that assigned units (all civilians in the case of an active civilian alert) may only go to targets within the burrow, and not perform tasks that do not have their targets within the burrow. Path finding to that destination is completely oblivious of the burrow: it finds the shortest path. This also means non contiguous burrows usually won't work as intended, as dorfs readily pass from one area to the other through whatever you wanted them not to enter... Civilian alerts cause civilians to move inside the burrow, but ordinary burrows have no "pull", so units just stay rooted in place until they find a task that takes them inside the burrow when assigned to a burrow (with some exceptions: need fulfillment can violate burrows, for instance).
The burrow spamming comes from task assignment assigning tasks without checking that the target is at a legal location, so the task is accepted, but the path finding finds that the target is in a disallowed location, so the task is cancelled. The task assignment finds a task (quite possibly the same one)...
Movement restrictions (d-o, I think) specifies the cost of moving one tile (I think the default is 5), and so can be used to guide dorfs to move along certain paths and avoid others. However, the system doesn't work that well because there is no "DON'T EVER GO THERE" restriction. As an example, in an embark where water freezes periodically you don't want your dorfs on the ice when it melts, but ice is passable terrain. Painting the rivers and pools as restricted movement zones will increase the cost of crossing that terrain, but if the bridge is too far away it's still cheaper to cross over the ice. Also those restrictions are omni directional, so you can't specify that it's cheaper to move away from the river than moving towards it. This means wood cutters and the like will still drown. (And visitors, caravans, and invaders completely ignore movement restrictions anyway).