This article explains what a Wi-Fi network in ad hoc mode does and how to set up an ad hoc network on Windows 10, 8, and 7.
Using a wireless router to set up an ad hoc network
A Wi-Fi network in ad hoc mode (also called computer-to-computer or peer mode) allows two or more devices to communicate directly with each other, rather than going through a central wireless router or access point (which is what infrastructure mode does).
Setting up an ad hoc network is useful when a wireless structure has not been built, such as when there are no access points or routers within range. Devices do not need a central server for file shares or printers. Instead, devices can access each other's resources directly via a simple point-to-point wireless connection.
The devices participating in the ad hoc network need a wireless network adapter. In addition, the devices must support a hosted network.