"Ad hoc" is a method by which multiple wirelessly enabled devices may communicate without needing a central hub, or base station. It’s not the way most people use Wi-Fi in that it connects computers directly without the need for a router. Instead, ad hoc networks are primarily created for temporary use, as the Latin origin of the term, meaning "for this," implies.
Say you had two laptops out in the field with no connection to the Internet. You could create an ad hoc network between the two to transmit files and share data. Although it is possible to connect to the Internet using an ad hoc network, it is generally used to connect to other devices.
For VISTA
Host Computer:
1) Go to Start and right click on Network and then click Properties.
2) Network and Sharing Center window will appear, click on Set up a connection or network.
3) Set up a connection or network window will appear, select Set up a wireless ad hoc (computer-to-computer) network option, then click Next.
4) Set up a wireless ad hoc network window will appear, this window will briefly explain to you what is ad hoc wireless network. Click Next after the reading.
5) On this wireless network configuration window, you can type in the network name, security type (encryption) and security key. Don’t forget to enable the encryption, if not every nearby computer can connect to this network. Click Next again.
Client Computer
1) Go to Start and click on Connect to.
2) Connect to a network window will appear. This window will show all available connections, which are dial-up, VPN and wireless connections, but your focus is on ad hoc wireless connection. Scroll down the list and select the ad-hoc wireless network and click Connect button.
Et voila:)