A shaped charge is a particular method of utilizing high explosive. As the military and civilian urban legend goes (and this one might even be true) it was discovered when some demolitions experts found themselves needing to test a block of explosive from a recently arrived load. They needed something sturdy to take the shock (and direct the blast away from them) and they found themselves a nice iron safe. Affixing the block to the far side of the safe, they detonated it. When the smoke cleared, they went to examine the safe to see how it had stood up to the shock. They were quite surprised to find a series of crystal-clear etchings in the safe's side where the explosive had been placed. Upon closer examination of the etchings and a fresh block of explosive, it was determined that the etchings were in fact a mirror image of the maker's logo from the explosive, which had been pressed into the soft explosive with a stamp.

Thus the basic principle of shaped charges was born. In a nutshell, here's how they work. Whenever you have a surface of explosive material that detonates, a shockwave of energy and hot gas and byproducts flies directly out from the surface, along a path that is (at least initially) perpendicular to the surface. However, if there is a formation where faces of explosive are pointed towards each other, the shockwaves will meet and interfere. If they meet at an angle, their force can be combined into an extremely high-energy jet. The higher energy density of this jet enables it to cut through materials which normally could withstand the blast.

Let's play with ASCII graphics!

         /  ---explosive 'face' one
       /  \  ---direction of 'face' one's shockwave
      /    \A  /----the shockwaves meet in the middle  
    D       *-------------------------      direction of jet---
      \    /B
       \  /  ---direction of 'face' two's shockwave
         \  ---explosive 'face' two
Ack. That didn't quite work. However, take the two 'faces' of the explosive (lines D-1 and D-2). When they are detonated at point D, they each send out a shockwave (A and B). These shockwaves meet at a center point (represented by an asterisk (*)) and combine to form a single wave or jet with the sum of the original waves' vectors. This means you get a single, narrow jet that heads directly away with the force of all the originals combined (roughly). That jet is what makes a shaped charge useful.

The jet is not simply a jet of hot gas, usually. For best results, the inner faces of the explosive are covered with a soft but dense material (copper is a favorite). Upon detonation, this face is pushed ahead of the explosion, and forms what is essentially a high-density plasma moving out the jet at high speed. This plasma can break through using kinetic energy what explosive byproduct gasses cannot.

They are used for all sorts of things. One of the most prominent is military; they are very good at making holes in very hard things, like, say, tanks. The HEAT warhead is naught more than an exotic shaped charge. Sometimes the metal liner is designed to produce a particularly massive plasma jet; this is called a self-forging warhead or SFW in milspeak.

They are used in controlled demolitions; bars of explosive are formed with slots down a long edge. They are then attached to support members of a structure with that slot facing in; when detonated, a 'sheet' of explosive force comes out of the slot and 'cuts' the support member. Modern versions can do this so cleanly that it looks cleaner than beams cut with a saw.

There are some important limitations. First of all, this only works with high explosive. The shockwave must be travelling at greater than approximately 1,500 meters/second for this to work. Also, the detonation of the explosive must happen in such a manner that the 'faces' of explosive detonate simultaneously; this means that the detonation point must be equidistant from the faces and the consistency of the explosive smooth enough that the detonation wave travels evenly. In warheads, the shape cavity is a hollow cone (for best results, one whose sides angle at between 41-45 degrees) in the end of a block or rod of explosive; the detonater (fuse) is typically placed at the back end of the block or rod, which detonates forward. Also, in order to work properly, shaped charges must be placed in the proper manner relative to their target. The closer to perpendicular the jet strikes its target surface, the better it performs. In the case of tank shells, the shell is moving fast enough that the detonation must begin when the shell is some feet from its target; otherwise the explosive will strike the target and deform before it has gone off properly. As a result, HEAT rounds on missiles and shells typically have a rod-like protruding sensor, which contacts the target first and triggers the detonation. This means that defense against such weapons is possible; targets seek to disrupt their shape before they fire, or to 'trick' them into detonating against the wrong surface. For the former, tanks use reactive armor, and for the latter, spaced armor.