It's both simple and complicated. In simple terms, you write stuff, then take it to the appropriate types of publishers and see who will offer a deal. Once your material is available for sale, you are a published author. The hard parts are being able to write well, writing things that publishers would be interested in, and being able to effectively negotiate a publishing deal, with a reputable publisher. You can also self-publish, which entails you paying a printer to have the books made, and then selling them yourself or through a retailer - which also involves price negotiating.