For Beginners - How-to SSH to RPi - Setup Putty in Windows
Once you’re connected it’s just a matter of copy pasting the commands given.
sudo just executes another command as root.
So the actual command starts after the sudo (and has several arguments).