Cloth diapers-opinions

Ok girls, help me out here. I see posts about cloth diapers and all I can think is "gross". I know I'm being ignorant on this as I've never even done research on them. Can someone just explain to me how they would even work? I mean, do you put a cloth diaper and then a waterproof liner over it? What do you do when the baby poops? Do you empty it into the garbage and then wash the diaper? That really doesn't seem great for the washing machine if so...like I said, I'm completely ignorant on the topic but see a lot of people are going this route so thought I'd ask opinions and how it actually works. Thanks ladies!