grep -5 "foo" *.txt
will search for lines containing "foo" in *.txt files in your directory ... and also provide the 5 lines before and after each match for context! The number can be any number between 1 and 9.
If you need more than 9 lines you can do:
grep -C 20 "foo" *.txt
There are also -A and -B options that let you specify after-lines and before-lines.
@darius I knew about after/before/context, but wasn't aware you could just use a number...