Some "free" boats are more trouble than they're worth, especially to a newer sailor. But if you can find an experienced sailor to look at boats with you, you can learn much.
Basic books are written for sailing classes; in the USA both US Sailing and the American Sailing Association have textbooks for their classes, such as "Sailing Fundamentals" by Gary Jobson or "Start Sailing Right", or the independent DK book "Keep it simple sailing".
Slightly more comprehensive or advanced is the Rousmaniere "Annapolis Book of Seamanship", which is often used as a textbook for longer-duration classes.
Don Casey and Nigel Calder are among the popular authors of maintenance and repair books.
"The best way to learn sailing" is one of those "beat a horse to death" topics that inspire at least twice as many opinions as the number of sailors you can stuff into a bar. Most people learn by a variety of methods that include mentoring/teaching and learning and practicing on their own. The best methods really depend upon you and your interests, abilities, limitations, circumstances, and sailing dreams.
Some boating groups offer free or low-price safety and other classes and seminars. If you are fortunate as to have a sailing co-op or community sailing center nearby, take advantage of them. And there is the very fine art of getting boat rides.