Wow, that's a lot of fun.
I lived on a boat for a few years at one point, and just recently sold our non livaboard boat.
A few pointers, first on learning to sail and then on buying a boat.
Learning to sail
The best way to learn is by doing, as always. There are courses that are well worth taking and I encourage you to do so. However, there is also a very mustachian way to learn to sail, and it's a lot of fun.
Find the local sailboat racing clubs. Most of them are full of boats that are desperate for crew, and will take on novices. By desperate I mean they usually race shorthanded because it's hard to find people willing and interested, especially over the course of an entire racing season.
Find out when the races are and put your name(s) out there. Some clubs will have a spot where crew can just show up and get recruited on the spot for a particular race. You will find some skippers are jerks, but most are good people.
Racing is a lot of fun, usually completely free for local racing, and a great way to learn how to sail a boat to its absolute limit without risking your own gear and cash. When you go cruising later you will stay well within the comfort envelope, but will be well prepared and even comfortable when things get windy and/or hazardous because you've experienced it while racing.
When I used to race I could have gone out as much as 4 times/week in the summer, and 2x/week in the winter. The only limit was how much time I had available.
Buying a boat
Never buy a boat that can't be sailed 10 minutes after you complete the transaction. I've seen more than a few marriages and dreams hit the rocks with 'project boats'. Don't do it. Maintain, don't build. There are boat builders and boat sailors, and they usually aren't the same people.
Low maintenance is the key. Aluminim mast, fiberglass hull, good diesel engine are the lowest hanging fruit. Every beautiful little piece of wood requires maintenance. Wood boats are beautiful but literally a full time job to maintain.
Costs go up exponentially with the size of the boat. You can get a great 28' boat for $8-10K, a great 32' boat for 20-30K and a great 40' boat for 40-60K. As the boat gets bigger, every little part gets bigger with it. Bigger sails, bigger motor, bigger lines, bigger blocks etc). Get a decent size boat, but be suspicious if it is really cheap. Of course, comfort goes up with size as well (though not necessarily at sea).
Get a boat that is fairly common, so if something does break the parts are easy to come by and don't need to be custom built. It is way easier and cheaper to replace a piece from a Catalina or a C&C (for example) than a custom built boat.