If you're on the school computers skip this step.
Visit this site and download the right version of python for your computer's operating system (Mac for Mac, windows for windows, etc.)
https://www.python.org/downloads/
Run and install python. Make sure pip is included as this is the tool that will help you. If pip installs correctly, you can skip the next section.
Before you can install third party libraries like pygame or pillow you first need to make sure your computer has pip (assuming you've already installed python). If you're on a windows computer you can user powershell, if you're on a Mac you can use terminal. You can also use the terminal in visual studio code. Type in the following command and it should automatically install pip for you:
python3 -m ensurepip
This will install pip onto your computer to now install third party libraries. You can do this by typing:
python3 -m pip install --upgrade pip --user
and now you should be able to install third party libraries like pygame using the following command:
python3 -m pip install -U [library name here] --user
and the library should now install on your computer. If you're on the school computer you may have to do this more than once.
Try adding python to the path library, you can do this by following the steps in this site:
https://www.educative.io/edpresso/how-to-add-python-to-path-variable-in-windows
If all else fails please talk to your teacher for additional help.