Writers like Dostoevsky, what was the process of finishing a book? Did he go to a publisher and hand them the manuscript and they did the rest, advertising, etc.
How were books advertised? What else were the responsibilities of the writer?
I can't say for Dostoevsky or his context, but here's an example from Darwin. Darwin submitted On the Origin of Species as a handwritten manuscript to his publisher, John Murray and Sons. It is unclear to me how many copies he had made originally. (His friend, Joseph Hooker, was given the copy and accidentally destroyed a chapter by leaving it in reach of his children, who used it as drawing paper, but Darwin had an old version of it, apparently, so nothing was lost.) Murray typeset it and gave the proofs back to Darwin, who then hand-corrected them. The corrections were added to the final type setup, and it was published. This is essentially how it works today (I am waiting for my page proofs to arrive...). Darwin would continue to make amendments in future editions as well.
In terms of advertising, that is and was the publisher's responsibility. They want it to sell, after all! In the case of Darwin's book, aside from the standard announcements of publication, sending it to newspapers and journals for review, and other things like that, it was added to Mudie's traveling library, a sort of 19th century Netflix for books. This gave it very wide circulation among the literate public (which was very large in late-19th century England), well beyond most scientific texts. Murray also had an annual "sale dinner" in which the top booksellers would be invited to hear about the books of the year and get special deals on new orders.
Of course, in Darwin's case, the book became a major phenomenon in and of itself, so the advertising probably was not too important — it probably would have been a literary event no matter what, given the subject and the importance of the writer.
More interesting from a historical perspective is how copyright worked in other countries. There were no international copyright agreements at the time, so any foreign publisher could race to publish their own edition — whoever got it first was basically the winner. Which is bonkers, but there you have it. In the case of the USA, Darwin's friend Asa Gray found that the publisher Appleton & Co. had basically typeset the book, so they set up a deal with Darwin that he'd give them some new material and then it would be an "official" publication and not an unauthorized one. Such was the no-man's land of publishing at this time — the first "pirate" became the authorized publisher because it was easier for Darwin to guarantee he'd have editorial control over it (and get a cut of proceedings, etc.) than the alternative.
The details on Darwin's publishing are in Janet Browne, Charles Darwin: The Power of Place, chapters 2-3.