I've just done this, and will share what I did both for the OP to hear and for the folks above who are clearly more pro-grade than myself with the electrons and copper can point out anything I did wrong so he gets that, too...
One of the first things I learned is that there are more types of breakers than I would have thought out there (e.g. mine are Square D "type QO"; you get different types even within one manufacturer.
Anyhow, My compressor lives about eight feet from my panel along a cinder block wall, so my life was made easy there.
I used armored cable (I think the common name 'BX' is actually a particular brand's name for it) which I got with wire already inside. It was 3/8" flex armor housing with 12 gauge wire (this is a 20-amp circuit). Two conductors plus ground. My compressor had a clamp meant to accept the bare BX housing without a clamp at that end, pretty much like this:, so I just inserted an anti-short/anti-cut plastic sleeve into that end before wiring it into the compressor's switch.
At the panel end, I used a clamp like this, which fits into a knockout in the panel, and threads into the BX armor's "threads":
I tend to do like the OP and shut the power to the box completely off back inside the house (and tape over that breaker). While I know you can do this safely without doing that, I don't have the visual familiarity inside a breaker panel that I do under the hood of a car. So while after much reading I'm about as confident as I get (I maintain a certain amount of worry about everything in life ) that everything is wired correctly, I just prefer not to be worrying about what I touch while I'm working in there while I'm also double-checking that I've got everything wired correctly. Mine's a 240V compressor, so black and white go to the breaker, and ground goes to the ground bar.
After doing the roofing last year with two fluorescent lights, the boom box, and my old 120 compressor all on the one 15A 120V circuit in the shop which would trip most times the compressor kicked on, it was immensely satisfying to fire up the compressor and notice that the lights didn't even dim one whit.
EDIT, addenda (also I just corrected all my 110/220 references to 120/240...):
The screw-into-the-armored-cable knockout adapter struck me as the cleanest, and I'd probably continue to use them. That said, they can be kind of a pain to get started, and the external-clamping variety might be easier to deal with.
I don't know about other breaker types, but the QO have two sort of sprung clamps per slot on their bases. By "per slot" I'm referring to how a single-pole breaker for 120V takes up on slot while a 240V takes up two spots). One per slot clamps onto the a power source, the other is just a clip onto plastic to locate the breaker. I imagine that this differs from type to type to some extent. These just press into place and pull off...