It's " at the drop of a hat". It is treated like any adverb grammatically. Why don't you try to make a sentence, and we'll see if we need to help you with it at all.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.