Execute code from terminal

Hi guys/girls(if any) I was hoping someone could tell me how i can execute code through the terminal as i can’t quite get the info. i need.
Every time i try to run try to run the code it comes back permission denied. I’ve tried the ‘chmod’ command but that doesn’t seem to work either.
Really appreciate the help, I’ve been stuck on this for days. >:( >:(

What command are you trying to run ?

Have you tried prefixing the command with “sudo”, as in:

sudo mycommand

then entering your password when prompted ?