A scriptPubKey is an ouput transaction script. It defines a condition that must be met to spend funds commited to the output in question.
See also: scriptSig
To understand how transactions work on basic technical level, check blog post Types of Bitcoin transactions: Part I, Part 2. More detailed description can be found in Bitcoin Wiki or in Bitcoin.org Developer guide.