1) Download the patch to the directory that the file being patched is in.
2) In terminal,
Once you're in the correct folder, run this command using the exact name of the patch file:
patch < my-filename.patch
If the patching was successful then you will see one or more lines such as "patching file my-file.module".
3) Clear your drupal cache