The symbols on the lock will either be a red boxed shape diamond, or a red torch and flame. The locks must have one of these symbols to be TSA-approved. TSA-approved locks can be purchased at most places where locks are sold. This includes Wal-Mart, Target, Home Depot, and Lowe's.
Somewhere on the lock will be a TSA code. For example, one code reads "TSA 001." This code will let Transportation Security Officers know the lock is TSA-approved and most likely will be on the bottom of the lock.
The code on the lock will correspond to a master key. The TSA maintains secure control of the master keys and only use them if a bag inspection is needed.
In the event the bag needs to be physically inspected, a TSO will open it by using the appropriate key that corresponds to the code on the lock. An officer can complete his inspection and re-lock the bag without having the passenger present. If the lock is an unapproved lock, a TSO will cut the lock open to inspect the bag.