From the TSA's website (before the current changes)...
Explosives Detection System
Ever wonder what happens to your bag once you check it with your airline? We screen every bag placed on an airplane, whether taken as carry-on or checked with an airline. With nearly 2 million people flying each day, it's a Herculean task.
We are able to meet this requirement by using Explosive Detection System (EDS) machines, which work like the CT machines in a doctor's office. Through a sophisticated analysis of each checked bag, the EDS machines can quickly capture an image of a single bag and determine if a bag contains a potential threat item . If a bag requires additional screening, it may be automatically diverted to a resolution room where security officers will quickly inspect it to ensure it doesn’t contain a threat item. Once cleared, the bag is reintroduced to the system, where it continues onto the aircraft. In some cases, the alarm is quickly resolved and in others law enforcement and/or the bomb squad may be called in.
When used in conjunction with an airport's automated inline baggage handling system, we achieve dramatic improvements in both security and efficiency.
Explosives Trace Detection
Explosives Trace Detection (ETD) is technology used at security checkpoints around the country to screen baggage and passengers for traces of explosives. Officers may swab a piece of carry-on or checked baggage or a passenger’s hands and then place the swab inside the ETD unit to analyze it for the presence of potential explosive residue.
In 2010, TSA expanded its use of ETD technology in airports as part of our layered approach to aviation security and to keep passengers safe.
Passengers may experience screening of their hands using an ETD swab at the security checkpoint, in the checkpoint queue, or boarding areas. To ensure the health of travelers, screening swabs are disposed of after each use. Since ETD technology is used on a random basis, passengers should not expect to see the same thing at every airport or each time they travel.
http://www.tsa.gov/about-tsa/security-technologies