It's called censorship. The notes in one edition say:
The omission of part of the names here, as elsewhere in the text, was done by Dostoyevsky in order to placate the censor
Much like we now usually use asterisks, older works typically used em dashes (not underscores, which are lower on the line).
The New English Dictionary (1887), predecessor of the Oxford English Dictionary, says this of "bloody":
[...]now constantly in the mouths of the lowest classes, but by respectable people considered ‘a horrid word’, on a par with obscene or profane language, and usually printed in the newspapers (in police reports, etc.) ‘b——y’.
Because (or in spite of?) the subject, Grose's Classical Dictionary of The Vulgar Tongue also has plenty of examples. Here's one where "turd" is censored:
Honey Moon. The first month after marriage. A poor honey; a harmless, foolish, good-natured fellow. It is all honey, or all t—d, with them; said of persons who are either in the extremity of friendship or enmity, either kissing or fighting.
Further down on the page, "**** hooks" is defined as "fingers", so asterisks were also sometimes used, particularly when all the letters were censored as to prevent it from looking like a regular em dash. (The omitted word here is "cunt".)