You might be interested in some previous threads on the origins of the title "democratic republic":
Why do some clearly non-democratic countries (German Democratic Republic, DPRK, etc.) have the word democratic in them? - 63 comments, over 2 years old.
The commenters here dissect the meaning of democracy as applied to modern states and show which elements of it describe the systems of various communist nations as was understood by those nations.
Why doesn't Cuba have a cool "Democratic" or "People's" in its name? Was there a difference between Democratic, People's, and Socialist republics? - 21 comments, over 2 months old.
The top comment discusses the revolutionary past of Cuba that preceded the communist takeover as well as the general use of "democratic" terms by communist governments during the Cold War.
Why is North Korea called the "Democratic" People's Republic of Korea? - 4 comments, over 11 months old.
A commenter dissects the government elements that North Korea has which match up with its title as well as the political situation that made the title advantageous and and logical choice.
To answer more simply, communism involves a rising up of "the people" or the proletariat/working class, which then take over the means of production. In reality it ends up with a select group (the revolutionaries) taking over the government and controlling the government and then the industries. They claim they are the revolutionaries "of the people" and therefore a rule "by the people". It spins well for propaganda.