In Team Fortress Classic this is an item carried by the Demoman class. It makes very large explosions. The detpack is by far the most destructive force in the game because of its large radius of effect and extreme damage delivery.
A Demoman starts off with one of these each time he spawns in to the game (although, a mapper can choose to prevent this), and he can only carry one detpack at a time. A map may contain ways to get more detpacks, but dying and respawning is generally the most consistent.
The detpack is 'planted' by a demoman at whatever location he thinks will be most beneficial. This could be a well-traversed intersection (if he is hoping to get kills), next to a wall (if he thinks the wall will be destroyed), or in an enemy’s command center (in order to destroy their equipment). The planting process takes about 5 seconds, during which the demoman is defenseless.
The detpack can be set for 5, 20, or 50 seconds; but the latter two may require special key bindings. A few seconds before it goes off it will start emitting a rather obnoxious ‘spooling up’ noise to warn those nearby of their impending doom. This will be followed by an explosion that is likely to send dead bodies flying across the map. However, if a Scout touches a detpack, it will fail to go off.
If you want to set detpacks effectively then you will need to define the following key bindings in your console (hit ~):
bind x +det5
bind y +det20
bind z +det50
bind w "detstart n"
where x, y, and z should be replaced with your chosen keys. These commands set detpacks for 5, 20, and 50 seconds respectively. These are the only possible values.
To use them, hold down your chosen key until you hear a little chirp indicating that the detpack is armed (then run away!).
The detstart bind sets the detpack for n seconds. This key does not need to be held down and once you start setting with it, you will not be able to stop.
Always read the map information to find out if the map contains detpackable areas or other special detpack effects.