Each maker had its own mounts, and they changed over the years: Canon FD for its manual-focus SLRs (the AE-1 among them), Nikon F since 1959, Leica M for its rangefinders.
The same physical mount isn't always fully compatible. Newer lenses may lack the aperture ring older bodies need, and some older lenses need modification for newer bodies. Check the details for your combination.
Many film lenses can be adapted to digital cameras with mirrorless mounts, which keeps the prices of some lenses up.