You can do many things with WiFi, but what you can do *practically* is much more limited. A couple of ham radio ops have the current world record for something like 125 miles using standard WiFi cards--but in order to get that working, they also use a 12' dish antenna and special software because there are timing issues when standard networking is pushed that way.
As a civilian your practical limit will probably be 1/4 mile to 1/2 mile even if you buy a direction gain antenna, which can be a yagi or parabolic type with 9 to 24db of gain. (More is better.) So what you can do is buy the highest gain antenna you are willing to afford. Know that you will have to hunt & point it directly at the other connection. Height counts, so raising it 20' or so will help establish a clear connection. But the coaxial cables used for WiFi antennas have a great deal of loss in them, so you also need to attach your WiFi *router* to the antenna with the shortest possible antenna cable, and then use a longer USB or ethernet cable to come down from the router to your computer. Sounds convoluted, but that is how all the long-distance WiFi work is down, with the router up at the antenna. Not with a Wifi card in your computer.
Check out the seattlewireless web site, they also list the power output of various models of WiFi router. The more power it has, the more power goes into your antenna, the better chance you have of longer range.
On the bright side, two new forms of wireless are deploying this year and next year, and both will have much larger ranges. "WiMax" is one of them, but right now you probably won't find it.