A WiFi adapter allows a device to take part in a WiFi network. WiFi is simply an alternative way of connecting a device to other devices rather than use other interconnection technologies including Ethernet, Bluetooth and USB (there are others).
WiFi adapters in devices such as PCs and phones can either form the host/centre of an infrastructure network or it can be a client connecting to an existing network. In Windows PCs running Windows 10 versions 1703 or 1709 can simultaneously use a WiFi adapter as a client on an existing network, and also as the centre or host of a second WiFi network for up to 8 client devices. On Android phones, the adapter may either be used as a client on an existing WiFi network, or as a host for its own WiFi network.
There are two peer-to-peer like options. Ad-hoc: which allows a group of devices to communicate directly with each other without any host or centre point to the network; and WiFi Direct: where one device offers a private WiFi network to which the other as a client can connect. WiFi Direct has mechanisms to allow for the easy sharing of a WPA2 encryption pass phrase or key. Unlike traditional WiFi networks where a router or wireless access point provide a star point, these peer-to-peer options allow devices to communicate directly. This means that each packet between WiFi devices require one wireless hop, while connecting through a router to another device requires two hops and can are potentially slower.
In devices such as phones, tablets and many games consoles, the adapter is built in and there is no scope to use a different adapter. PC adapters can be designed to use a USB port or they can connect to an internal socket such as PCI. It is important that any add-on adapter has a compatible connector type, and also is supported by an appropriate software driver for the particular adapter and the computer's operating system.
As WiFi networks, particularly those provided by a router are shared between all the devices using that network. This can potentially make the connection behave erratically if other users are transferring large amounts of data.
I hope this helps.