Before we get started, there are a couple issues to be aware of. First of all, the onboard mics on DSLRs not only are of low quality, but also are usually placed on the front surface of the camera body, right where they can be blocked by your hand's natural position gripping the camera. The result is a muffled sound.
Another plus offered by external microphones is variety. Although capable of stereo recording via the external mic input, the internal mics on most DSLRs are single-channel, mono elements. That's okay for simple talking-head interview shots, but not so good for recording something more complex like music or ambient sounds. But don't count mono out completely—most highly directional shotgun mics on the market, both professional and prosumer models, intended for distance recording and dialogue capture are mono because stereo isn't important for the sounds these mics typically record.
What is important, however, is making sure your camera actually has a provision for an external mic. Usually, that's a 1⁄8-inch input jack next to the USB and HDMI ports on the body. Many, but not all, cameras have a 1⁄8-inch mic input, but check your owner's manual to be sure. If your camera has no mic input, you can use a mini-pocket-sized digital recorder like the Roland R-26, Tascam DR-07mkII, Sony PCM-M10, Yamaha C24 or Zoom H2n and sync your camera sound with the recorder's track later during the editing phase.
There are two common categories of microphones used in professional audio. Rugged and simple in design, dynamic mics depend on sound waves striking a diaphragm attached to a coil of wire, which moves within a magnetic field, thus creating an output signal. It's the exact opposite of the way in which a speaker operates, where a voltage input moves a diaphragm that creates sound waves. A variation of the dynamic approach is the ribbon microphone, which places a thin metallic strip between two large magnets. As the fragile mic ribbon element is highly susceptible to damage from extreme wind gusts, these models are rarely used outside the studio.
Condenser mics employ an electrically charged metallic diaphragm that's separated from a conductive backplate by a thin air layer. Sound waves vibrating the diaphragm create a very small voltage change that's amplified by a miniature circuit within the mic body. Both the condenser mic capsule and electronics need a power source, fed either from an internal battery or powered directly by the camera preamp or mixer.