If you learn to dive with a BSAC club, the answer to this question is that it depends…
To be an Ocean Diver you need to complete six classroom lessons, five sheltered water (pool) lessons and four open water lessons (plus some other bits, like theory and swimming tests).
Your training might be organised in different ways, for example doing all the theory sessions in one weekend, or doing one a week for seven weeks. Obviously, doing it in one sitting means you can be qualified quicker!
So, you could be finished very quickly, or it might take you a little while. Your club will want to make sure that you are safe and happy underwater, which means they’ll be looking after you through your training, so that you can be a safe diver while doing lots of exciting diving.
In terms of getting into the sea, you need to be confident and competent in sheltered water first. Many clubs start their open water training in quarries, which provide predictable conditions and are often well set up for new divers. Having said that, Ocean Diver training in the sea is definitely possible.
The best thing to do is have a chat to someone in your club (the Diving Officer or Training Officer are good bets) to see what they are planning.