Usually there's supposed to be a program or whatever that you download, etc. to get the sound effects from TF2 to be useable, but for the rest of us, I've found a simpler solution.
This guy's posting sound packs for each of the characters for download. A great resource for making TF2 machinima, etc. Simply find the video of the character you want and a link to Download the pack of their lines will be in the description.