As I was discovering some scanned Latin books on Google, I noticed some had the ‘s’ replaced with ‘f’ and the ‘i’ with ‘j’. Why is that?
Two different things. i in Latin can be both a vowel and a consonant. Some books, especially from the period from which you can actually read the scans on Google, use j for consonantal i.
If you look closely to words with an f in them, you’ll see that there is a difference between the f and the long s, as it’s called. The f has a cross-bar, the s doesn’t. See here for more information
Ingrid
That f-looking thing, as Ingrid notes is an s. It was a long-standing bit of typographical convention in English and American printing for many years (possibly other places too, but I’m most familiar with American printing given my past career). I’d guess it was phased out in the early 19th Century. A pity as it is fun, but when hand-setting type there are only so many spaces for letters in a California case.