1. You produce novel research.
2. You submit novel research to the best conference or workshop you think will publish it.
3. The editor (a volunteer) invites other researchers to volunteer their time to peer review your research.
4. Assuming your research bears up under scrutiny and the peer reviewers are not actually competitors who decide to reject (this supposedly happens, but is rare), your paper passes peer review.
5. Congratulations! The conference or workshop agrees to publish your novel research. For this, you generally must show up to the conference or workshop to present your work in person. This costs money (conference registration), and also travel cost and such. However, if you were going to the conference anyway, there is no added expenditure.
6. Having been paid by you to publish your work, ACM sells your paper at somewhat exorbitant prices to university libraries (unless you paid them lots extra to just make it available for free). However, at no cost to you, you are also explicitly allowed to post a "pre-print", identical to the published paper, on your personal/university website, where it will be promptly found by Google. However, the hosting is your own concern. (You can also upload the preprint to arXiv.)
It's a decent procedure. ACM also publishes journals, which do not require you to present anything in person. I do not know whether any author-borne costs are involved if you go that route.