If you are a fiction writer who wishes to publish, there are three routes you can take:
With traditional publishing, you submit your manuscript to a literary agent, who may pass it on to a publishing house if it is considered commerically viable. If accepted, the publisher carries out all aspects of the work: editing, cover design, marketing, printing, and distribution.
With independent publishing, you submit your manuscript directly to an independent publishing company (who may be an offshoot of a traditional publisher.) You pay for the service, but the fee and what's included varies between publishers. If no full editing service is offered, it is advisable that you employ a freelance editor before submission.
With self-publishing, you are responsible for all of the stages required to publish a book. You can use a self-publishing platform, such as Amazon's KDP, for publication (other platforms are available!). Whilst the setup and publication is generally free, you will still have to pay for editing and possibly cover design. Again, having your work professionally edited is advisable.