am i suposed to hook a 40 ohm resistor to the ground?
nope, not for a push button
then in the code what do i put so it does something when the button is pushed?
I'm confident you can figure this out after reading through the source code and searching the forum/google. Give it a try and if you still get stuck, post what you have and we'll help from there.
Step 0: connect one end of the button to ground, the other to your pin
Step 1: configure a port as a digital input
Step 2: turn on pull up resistor
Step 3: read the port value