What version of Mac OSX do you have? Did it just start happening recently? You can turn your wifi on and off at anytime in your network options in system preferences. When you open your network preferences(in system preferences) make sure your wifi is at the top of the list on the left. If you get the internet connected but then it stops working on you go into your console. You can get there from the finder menu by going to go--->utilites--->console. Look for logs around that time dealing with your network and post them if you can.