Connecting two networks through the air at long distances (100’s of meters to several km) is possible with low power WiFi equipment as long as you have line of sight between the two locations. It requires choosing the correct antennas and amplifiers for the job. This is for point to point transmission, not for a broad coverage ‘hot spot’. The intention of the antennas is to focus all of the radio power into a narrow beam, rather than radiating it 360 degrees.
About WiFi Antennas
http://www.radiolabs.com/Articles/wifi-antenna.html
Homemade long-haul WiFi
http://creationfactory.blogspot.com/2007/06/long-haul-wifi-links.html
http://creationfactory.blogspot.ca/2008/03/long-haul-wifi-new-developments.html
Companies that have long range antennas and outdoor WiFi products
TPLink: http://www.tp-link.com/products/productDetails.asp?class=wlan&pmodel=TL-WA5210G
Hawking: http://www.hawkingtech.com/products/index.php?CatID=32
Engenius http://www.engeniustech.com/
C Crane http://www.ccrane.com/antennas/wifi-antennas/wifi-bridge-kit.aspx?RefID=WS050900DX000000#.UCK3t01lS2U
Inveneo http://www.inveneo.org/wifi_access_point
CA World WiFi http://www.caworldwifi.com/Frequently-Asked-Questions.html
This PDF article outlines using WiFi over hundreds of km.
If two machines are connected to the Internet but not on the same network, you can use Remote Desktop, VNC or other programs to connect them, or create a Virtual Network (VLAN) or Virtual Private Network (VPN)
Remote access software
Remote Desktop Comparison http://en.wikipedia.org/wiki/Comparison_of_remote_desktop_software
RDP definition http://en.wikipedia.org/wiki/Remote_Desktop_Protocol
LogMeIn https://secure.logmein.com/
GoToMyPC http://www.gotomypc.com/remote_access/remote_access
VNC http://en.wikipedia.org/wiki/Virtual_Network_Computing
RealVNC (open source) http://www.realvnc.com/products/free/4.1/index.html