SSH keys fill the same role as a username and password, in that they are used to authenticate with servers. The general idea is that you generate a pair of keys using some program, upload one key to servers to associate with your account, then send the other to the server whenever you need to log in instead of using a username and password.
The key meant for sending to servers is called the "public key," and the one for actually authenticating is called the "private key." Make sure you keep your private key to yourself, since anyone can use it to authenticate as you.
You may upload the same public key to many servers if you want to use the same private key for authentication, so feel free to re-use an existing one if you have any already. In this case, you may skip to the second part of this guide: adding the SSH key to GitLab. If you do not have an SSH key yet, you'll need to start with the next section.
We'll refer to the GitLab SSH setup guide for instructions here, but first, some notes:
Okay, now that we've gotten that over with, here's the link to the guide.
Assuming that you've generated your keys properly and in the default location, programs such as IntelliJ and the command line version of Git will automatically attempt to use your private key when authenticating with servers.
Again, we'll just direct you to GitLab's guide for adding SSH keys.