wi-fi is on? in the settings --> wi-fi section?
you have selected a wi-fi network? entered the password if rqd?
and you know for a fact that the wi-fi is set up correctly? you can use another device to get onto the internet? if thats a yes too, then
have you done a restore of the iphone? maybe worth a shot.
(i can walk in to work/home and it automatically picks up the wi-fi there, and starts using it, i dont ever have to change anything - so your situation isn't normal!)