Mac OSX has inbuilt internet sharing feature by which you can easily turn your Mac into a Wifi hotspot. For example, suppose your Mac is connected with Ethernet adapter and you want to share this internet with multiple devices. For this, you need to turn your Mac into a WIFI hotspot. First, go to "System Preferences" and open "Sharing".
Then turn on "Internet Sharing" and select your connection. If you are connected via Ethernet, Bluetooth or tethered to an iPhone via a USB cable, you can select those from option.
Then open “Wi-Fi Options” and configure your Wi-Fi hotspot. By default, the Wifi hotspot will be configured without any password and anyone can access it. If you want to make it password protected, then make sure to click on the "Security" box and select "WPA2-Personal" and provide a password.
Finally, click "Ok" to turn on Wifi hotspot.