I would highly suggest that you post the make and model number of the compressor for us to see.
Yes, many air compressors do require direct connect but some also require a "pressure switch" to be inline between the source power and the compressor. The pressure switch will cut the power to the air compressor when the pressure reaches a preset limit. If the air compressor is not wired correctly or you by pass the pressure switch the compressor will run and run and run and never shut off.
So before you go wiring anything first you need to know the "name plate" ratings of this air compressor. There should be a metal plate on the air compressor somewhere indicating amps, volts etc. If you can take a pic of the name plate that may help too. Also, getting the wiring diagram for this compressor will help us guide you better.
Also is this a new air compressor or did you buy it second hand?
We can't do guessing work here.