chmod (change mode) sets permissions. Only the file's owner (or root) can use it on a file.
The letter way says who, then + to add, - to take away or = to set exactly, then which permissions. Who is u (user, the owner), g (group), o (others) or a (all three).
$ chmod u+x backup.sh # the owner may run it
$ chmod go-w notes.txt # group and others may no longer write
$ chmod a=r readme.txt # everyone may read, nobody may write
The number way gives each set a digit, adding up read = 4, write = 2 and execute = 1. So 7 is rwx (4+2+1), 6 is rw- (4+2), 5 is r-x (4+1), 4 is r-- and 0 is nothing. Three digits cover owner, group and others.
Those three are the ones you'll use most: 755 for programs and folders, 644 for ordinary files, 600 for private things like keys. chmod -R changes a folder and everything in it.
Avoid chmod 777. It lets anyone on the machine change or replace the file, and it's almost never the real fix for a Permission denied error. Work out who needs access and give them just that.