How accurate is unguided artillery (on its first shot)?

I’m always amazed by this stuff.
Like, how Victorian era battleships were able to hit targets almost over the horizon - from a moving platform.