for starters you want to make sure your wifi is turned on in your phone settings.
if you have an unprotected wifi then just by clicking on the network (again under settings, wifi) it should connect. just for reference: for hotel/other free wifi services you often have to go to internet and do their login page first.
i haven't had the opportunity to connect to a secured wifi as of yet but there is an option to use a password on secured networks. there is also an option to manually type in all the data for your network if you so choose.