Wifi on what? your phone? your home router?
in the settings on the iphone 4 under personal hotspot you first turn it on, make sure you either know the hotspot password to connect your devices or change it to another of your choosing.
Then from your laptop or desktop have them search for your iphone network. click on connect if and when its found and it will ask for the security code. enter it and that computer is now connected to your iphone.
The top of the iphone will say how many connections are on. That is how you know who is connected.
If you are trying to connect your iphone to your home network or open wifi make sure wifi is toggled on, then it will search for networks and either ask for a security password to connect or it will just connect. in the settings of the iphone under wifi it will show the network it is connected to.