Imagine two people want to run their programs in the same computer. However, both programs would struggle to run because resources have not been distributed correctly and are likely to crash. PBS allow us to pre-establish what resources you need to run your program, and can be used so that people work within the same computer without any conflict.
Now that that's out of the way, let me provide an example of a PBS script:
#PBS -N TEST
#PBS -l nodes=1:ppn=8,vmem=20gb
#PBS -l walltime=48:00:00
#PBS -q default
#PBS -V
cd /Directory
command input.txt > out.txt
First line with the command -N is the name of the process that will be displayed when consulted the general queue. The Second line indicates what resources I need, 1 node (1 computer), 8 threads and 20 gb of virtual memory. The next line says that my job should at 2 days at the most. The next line indicates in which queue the process is going to be ran, in this case the default queue, may change depending on how your cluster is configured. Next line indicates PBS to use all the variables used in your environment in the process. Next is a change of directory, because you get redirectioned to your home directory after sending your job to the queue, and last but not least, all the commands to be run during the job.
If you do want to run it by typing input, I suggest you use an interactive session like this:
qsub -I -V -q test -l nodes=1:ppn=4,mem=8g
However this is not highly desirable, and might be limited depending on how your cluster is configured
...and I'm the 3rd person so far to reply at about the same time.
Great minds have nothing else to do on a Friday evening :)