*cough* documentation *cough*
Anyway, the variables you will be using are
p1_y
p2_y
p3_y
p4_y
p1_x
p2_x
p3_x
p4_x
p# refers to the port you're plugging the joystick into. x / y refer to the x and y axis. Values range from 0 - 255.
For example, if you're looking at the joystick in port one, and it is held in the center, p1_y is 127 and p1_x is 127.
p1_sw_trig
p1_sw_top
p3_sw_trig
p3_sw_top
p2_sw_trig
p2_sw_top
p4_sw_trig
p4_sw_top
These refer to the trigger and top buttons. (If you're using the white kit joysticks, I think the "top" button is actually on the side) They're set to 1 if the button is being pushed, and 0 if it isn't.
I'm pretty sure the "hat" button isn't even wired. So, you can't use it unless you take your joystick apart and wire it up yourself. (I may be wrong on this, though)
Also, I would read all the documentation I could find if I were you.

Innovation first has a programming guide which I found
very useful, and should answer most of your questions.
useful links
programming guide