The meaning of the idiom At the drop of a hat is to do something without a moment’s notice/immediately/without delay.
1. Riya has the bad habit of getting angry at the drop of a hat.
2. The bear loomed ahead all of a sudden, making everyone freeze in terror. Jake coolly opened fire at the drop of a hat, not hesitating even a bit.