From Wikipedia:

In computer science, the Boyer–Moore–Horspool algorithm or Horspool’s algorithm is an algorithm for finding substrings in strings.

It is a simplification of the Boyer-Moore algorithm which is related to the Knuth-Morris-Pratt algorithm. The algorithm trades space for time in order to obtain an average-case complexity of O(N) on random text, although it has O(MN) in the worst case. The length of the pattern is M and the length of the search string is N.

Read more about it here: Boyer–Moore–Horspool algorithm