You are correct; you need to execute the command at a command prompt.
In the instructions you have, the $ character represents the command prompt, so don't type it in.
As jdkaye said, you need to run the command as root or using sudo. That means that your normal user account does not have sufficient priveleges to run the command. In Linux, the root user is the super-user and can therefore run this command, but if you're logged in as your normal user you can still run the command by escalating your priveleges with sudo:
sudo apt-get install git
This will prompt for your user's password.
Basically, 'apt-get install git' says that the program called apt-get should install git, but by putting sudo in front of it you're running that command as a superuser.
You can think of sudo as Linux's version of the Windows' "Run as administrator" feature.