Nowadays there are various ways for an author to get published. But this variety also causes a dilemma for authors who are not always quite sure which is the best option in their case. Broadly speaking self publishing is better than traditional publishing because strictly speaking the author is also his or her own publisher as well. Obviously in self publishing authors need to proofread and carefully examine their final text, as well as take care of the marketing and distribution of their book. And this is not always that easy. This is probably why a number of authors prefer to opt for traditional publishing, and resort to a publishing house or literary agent to take care of these activities for them.
The main drawback in that case is that a publishing house might not be willing to publish the book in question. Obviously if a publishing house rejects it, the author would have to look for another publishing house in the hope that it eventually gets accepted. This process may be tedious and time consuming, as well as quite discouraging if more than one publishing house rejects the book. When a publishing house decides to publish the book, it will buy the rights of the book from the author. This is usually done in advance for a fixed rate, or else as an advance on the future royalties. Publishing houses will then take care of the printing, marketing, and distribution of the book.
Authors who prefer to take care of everything and avoid the intricacies of dealing with publishing houses, naturally opt for self publishing, and it seems that the latter option is becoming increasingly popular. Part of this is due to the Print on Demand technology which enables less costs due reduced inventory. Apart from that with self publishing an author can get the book physically ready much more quickly than with traditional publishing which often takes several months or years. Authors who prefer to be in control, and who have the time and funds required for self publishing, will naturally tend to prefer this option to traditional publishing. The choice is ultimately in the hands of the writer as even though self publishing seems to be more advantageous.