If you are a beginner, it will be easier through the UI (GNOME/KDE). But if you want via terminal, try nmcli dev wifi connect <SSID> password <your_password>