I mean, the sea is huge. How did two fleets actually find each other before a battle? Also, how did ships communicate with each other, even at close range?
The masts of a tall ship are, well, tall; the main mast of HMS Victory (when all its parts are attached) reaches 220 feet above sea level. Even if an intrepid sailor isn't actually going to stand on the top of the mast, a view from 200' gives you a horizon of about 17 miles or so, and assuming you're sailing in a fleet with other ships overlapping your line of sight, an admiral could sweep a surprising amount of sea in the course of a day. Keep in mind also that you can see the masts and sails of another ship when it might be hull down over the horizon, due to the curvature of the earth. And sailing ships in the period I study mostly stuck to predictable routes, and/or had areas they needed to pass through to get from point A to B (there's a reason the British are in Gibraltar still).
I wrote about Nelson's tactics at Trafalgar here before, in a post that explains how his ships caught up with then lost sight of the allied fleet when they were chasing it to the Caribbean and back. I wrote about naval blockades here, in a post that includes info about the process of keeping ships bottled up in harbor and looking for them when they broke out.
Presuming you mean pre steam. Numerous sources, notably campaign accounts give various answers to this e.g.