I live on the edge of Dartmoor and have some hands-on experience of letterboxing.
What is letterboxing?
It was reportedly started by James Perrott, a Dartmoor guide who placed a bottle for visitors' cards on a cairn at Cranmere Pool in 1854. Before the modern military tracks this was the most remote point of the moor and a fashionable spot to visit. (The current remote point is Fur Tor - a much more prepossessing spot!). Gradually more boxes appeared at other sites, and as others have said, the hobby has now spread around the world.
Boxes are usually hidden under overhangs around the tops of the Dartmoor tors, or in well-known woods and historic sites. They should contain a book for visitor comments, contact details for the maintainer and a stamp (with ink-pad) for your own log book to prove that you've been there. Dedicated letterboxers carry their own stamps for the visitors book along with an ink-pad as a backup. Sometimes people will leave stamped and addressed postcards - the idea is that the next visitor posts it back to them when they get home along with a message. Locals tend to leave them for visitors from farther afield, and I've heard reports of cards being posted back from all around the world.
There are two approaches to Dartmoor letterboxing.
Letterboxing as a hobby
A small number of people take it rather seriously. They have a club and produce catalogues of grid-references and guides to the hobby. Some of the boxes are "secret" and can only be found by deciphering cryptic clues. Club members log the stamps of the boxes they've visited, work towards achievement badges and attend meets. If this attracts you, you'll find resources here.
Casual letterboxing with kids
Much more commonly, people just look for the boxes ad-hoc as they walk. There are thousands of them out there (no-one knows how many) so in most areas they're not hard to find. You soon get a feel for the kind of places they are cached. Like most locals I only letterbox when I'm with kids, and they love to poke around the nooks and crannies till they find them.
Letterboxing code of practice
Rather sadly it's quite common to find boxes which haven't been re-sealed properly and replaced back in their sheltered cache - so the visitors book is destroyed by damp. Or boxes where someone has stolen the stamp. Please don't spoil other people's enjoyment: it will most likely be a kid that you disappoint.
And as others have said, be sensible on the ranges and don't handle anything suspicious. Your chances of encountering dangerous ordinance are very low but there's no need to take risks. Most modern boxes are plastic containers but there a still a few in metal boxes. It's usually pretty obvious what they are from the way they've been hidden.