How do I install patches? I found a hairdynamicscollition.txt patch for Blender that I wish to install.

How do I do it?

I tried to run it as a script, but when I do so in the text editor in Blender, a red mark is over the first sentence text in the script text, and the script doesn't work.
The simple answer is that you don't.

These patches are not intended for the end-user. They are intended to be used by developers to modify the source-code of Blender.

If you feel that you've got the skill-set to modify the source-code, more power to you! Unfortunately, most of us won't be much help. You'll get better support from the developers over at the Blender development project.