Just clicking the little [Airport] wifi icon in the menu bar and selecting your network (ssid) from the list is usually sufficient. If it needs password, it will prompt, and Bob's your weird uncle that no one likes to talk about.
If you aren't broadcasting a SSID, click 'Join Other Network' and follow the instructions.
You can go via Network Preferences, if you wish, but assuming you have the icon in the menu bar, you shouldn't need to.
Edit: this assumes a modern Mac, don't ask me to remember how things used to work back in the Jurassic era.