The old rules said you only write the 3 same consonants only if they are followed by another consonant. Schiffahrt with 2 f is correct under the old rules, because the f is not followed by another consonant. But it would be Schifffracht (ship cargo) with 3 f because of the last f being followed by a consonant. Or Hellila (light purple) with only 2 l in the middle instead of three (the word is a compound of hell and lila).
The new "simplified" rules from 1996 say you always write the 3 same consonants or vowels. Alternatively you can use a hyphen. Schifffahrt with 3 f is correct under the new rules. Schiff-Fahrt is as well. Schifffracht or Schiff-Fracht. Helllila or Hell-Lila.
While the rules are taught (and following the rules is part of the grade you will get), they are now lawfully binding in German-speaking countries, and indeed there are plenty of people, especially those who went to elementary school before 1996, and even publications that use the old rules still.
I was in school in the middle of it all. I was taught the old rules in elementary school but the new rules technically came into effect while I was in mid/high school. We were given a short introduction to the changes, and were allowed to use whatever rules we wanted. Some teachers would mark you down for spelling mistakes if you mixed new and old, tho.