Diatomaceous earth is a fine powder made from fossilised diatoms (as type of hard-shelled algae). It is mostly made from silica but it also contains aluminium and iron. It has a wide variety of uses - filtration aid, absorbent, filler in plastics and rubbers, abrasive in toothpaste and most interestingly for gardeners it can be used as an insecticide. As a result of it being such a good absorber, it can absorb moisture from insects and this dehydrates/dessicates and ultimately kills them. As it is abrasive, when it settles on insects and their food (particularly when it gets into their joints and if they ingest it), it also acts a bit like sand paper and kills the insects. It is effective against both hard and soft bodied insects so it is very useful for most garden pest insects.
Because of the way it works, it will also kill beneficial insects so if you wish to keep these insects in your garden, only apply diatomaceous earth to insects you can see. Applying it to plant foliage should only be done if really necessary. Diatomaceous earth is frequently used to protect stored grain and seeds from insect damage. You might also be interested to know that it is very effective against fleas.
If you would like to use diatomaceous earth in your garden, make sure you only buy products labelled as uncalcinated. Some people suspend diatomaceous earth in water and use it as a spray - if you do this, be aware that it will only be able to kill insects through abrasion and not through desiccation.
Be aware that although diatomaceous earth is a natural product, it can still cause health problems. If you breathe it in, it can cause respiratory problems for example. Contact with eyes can also cause serious eye damage. You should also be aware that very small particles of silica can cause cancer if they're inhaled. Those with existing respiratory problems, including asthma, might need to use protective dust masks (rated to the appropriate particle size) when using diatomaceous earth.