I don't know how much you know or don't know, so I'll cover what I can.
First be sure you created the compressor object. The parameters should be the Pressure switch channel and the relay channel that you are using on your breakouts on the cRIO. Then turning the compressor on or off is as simple as calling the start and and stop methods. From what I recall, the compressor will need to have the start() method called to turn it on in the first place ( I've done this in the initialization code for autonomous and teleOp). You can also turn it on and off using buttons or timers as well. It will automatically turn off once the pressure switch detects the system is at pressure.
Code wise:
Code:
Compressor compressor = new Compressor(1,1); // Creates the object. Make sure the parameters of (1,1) relate to the pressure switch and relay channels.
compressor.start(); // Start the compressor
compressor.stop(); // Stop the compressor
Again, you will usually want to put the compressor.start() in the initialization code for the robot so it starts automatically without user intervention (unless, of course, you want to manually start it).