How do cabinet makers achieve a seamless fit when joining panels with dowels to make up their furniture? The dowels obviously help align the panels perfectly, but to avoid a half millimetre gap along the join (between the panels), is anything extra needed such as hammering in thin nails or gluing the actual panels?
The answer to this question could be simple or complex depending on exactly what sort of joinery or cabinet making you're talking about - you're asking it in a fairly generic context. That said, it sounds like you're talking about joining individual boards with butt joints to make a larger panel. You've mentioned dowels - they are sometimes used when joining panels but are not a requirement.
Generally, to avoid gaps between the boards where they're joined, the edges are jointed using a jointer, a hand plane, or other tools. Jointing is basically the process of creating a true and flat edge. Boards with jointed edges can be glued together, creating a seam that has no gap.
To avoid alignment gaps (i.e. the surfaces of the boards aren't perfectly in-plane, leaving a ridge or lip along the joint), boards are typically aligned with either internal means (dowel pins as you suggested) or external (clamping jigs that hold the boards in fixed positions). Further, and perhaps more practically, panels are usually glued up prior to finishing - so, once the panel is glued, it may be planed to a final thickness, which would result in a true alignment of the faces of the boards, or at the least it'll be scraped or sanded to smooth the surface - which will also true up the surfaces and result in a flush alignment between the boards.
A final aspect to gluing up panels is lumber selection - choosing and orienting boards so they will behave well once glued. A board that has a lot of grain runout (the grain isn't in-plane with the surfaces of the board) or a large knot or other defect will be more likely to move and change dimensions before or after it's been glued into a panel, which can cause alignment problems regardless of how good the joint is.