It's the year 2000 and you have a great book that you want published and sold in bookstores everywhere. It's a lifelong dream and, besides, this book is great and important and everyone should read it.
So, what do you do? Best first move is to get an agent. Agents know editors. They have a track record of getting work bought and published by publishers. Publishers trust agents to bring them the good stuff. If an agent likes your manuscript, it's no guarantee it will get published but it's better than the alternative. The only drawback is that agents take a 15% cut of whatever you make, which is fine because, hey, you wouldn't make much if anything without one.