How did photography work before auto-focus was invented?
Pretty well for those willing to learn how to do it with the tools we had at at the time. The same is true now. The only difference is that now we must learn how to tell an AF system to focus on the part of the frame we want it to bring into focus.
Presumably everybody used manual focus. But here's the thing: I've tried manually focusing my DSLR. It's absurdly hard. Given how utterly tiny the image in the viewfinder is, I have no idea how you'd ever get an image in immaculate focus.
Due to the ubiquity of AF in most modern cameras, the focusing aids that were once included in what a photographer saw through the viewfinder are usually no longer present. Split prisms and/or prism collar micro screens were common in SLRs before AF came along. Some cameras had one or the other. Many cameras had both. Other types of cameras often incorporated a parallax rangefinder type of focusing aid.
Viewfinders were generally larger and brighter as well, even on consumer grade cameras. Now only the top pro models tend to have large, bright viewfinders that were more commonplace in the pre-AF era.
Lenses were also designed to allow finer gradations of focus adjustment. Focus rings on lenses had to be rotated much further to get the same change in focus position that now results from a very small movement with current lenses.
Or maybe people didn't? Maybe back before 24 megapixel images enlarged to fit on the side of a bus, focus wasn't quite so critical? Certainly if you print something out the size of a postcard, focus errors are going to be a heck of a lot less noticeable.
There is some truth to that for casual photographs, which is what the vast majority of photographs are. But there were (and still are) also large and medium format photographers that went to great pains to produce manually focused images suitable for display at very large sizes.
Some of the limits of sharpest focus were imposed by the recording medium. Part of the problem with roll film is that it doesn't like to sit flat in the camera. It's similar to the problem you'll have if you ever try to perfectly focus a projector onto a flexible portable screen flapping in the breeze. There were a few advanced cameras that actually used a type of vacuum to pull the film flatter against the back plate.
Focus with color film was also limited by the varying depth of the three color layers in film. If you were perfectly focused for one color, the other two layers were ever so slightly out of focus.
Digital sensors, in contrast, are so near perfectly flat that now we have to coat the back surfaces of lens elements to prevent unwanted reflections from bouncing off the layers of the sensor stack. The theoretical limits of best focus are now much smaller. Even with newer and much sharper lenses available today the limiting factor in the highest resolution systems is fast becoming the resolving power of the lens rather than the resolving power and flatness of the recording medium.
Also, my very first camera was a Fisher-Price "toy" camera. (Film, obviously.) I'm pretty sure it didn't have any focusing controls at all. (And this is way too long ago for autofocus to have existed.) How does that work? Is the lens just permanently focused at infinity or something?
"Fixed focus" cameras employ relatively narrow apertures combined with relatively short focal lengths. This gives a large depth of field. The focus is set at the system's hyperfocal distance so that anything from half that distance to infinity appear to be in focus. Cameras with this type of design can still be found. Among them are some (but far from all) webcams, cell phone cameras, trail cameras and other surveillance cameras (although they don't make up near as many of the cell phone cameras as they did a few years ago).
Some cameras had no way to see through the lens prior to taking the shot. A cursory viewfinder was attached to the side of the camera or, if you had a deluxe model, to the front standard that held the lens. No accommodation was made with such viewfinders for lenses of varying focal length. The photographer just had to know how wide the angle of view for the lens being used was. Focus was set by estimating or measuring the subject distance and lining up a mark on the lens to a scale with that distance. Aperture and shutter speed were also set manually with no metering built into the camera. Some of those cameras used roll film with anywhere from 6-12 shots per roll. Others used sheet film that had to be changed after every exposure. The latest versions of such press cameras were still being used by local press photographers in my hometown as late as the early 1970s.