01Try every shift
You have a text T of length n and a pattern P of length m. The naive matcher places P under T at shift s = 0, compares characters left to right, and stops at the first mismatch. Then it moves the pattern one position right and starts again from the pattern's first character.
If all m characters match, s is an occurrence. The last useful shift is n − m, because after that the pattern would hang off the end of the text.
In code it is two nested loops, about five lines. That is its strength: easy to write, easy to get right, and often fast enough.