In Drupal environment, to apply patch, go to the root directory of the module/themes and then run the following:
patch -p1 < /to/file.patch
Reference: https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupal/applying-a-patch-in-a-feature-branch