For A number of scams are designed to profit from the aspirations of those who wish to become writers. Most of them have in common an implicit or explicit promise of publication if the writer pays money from some thing or service. Legitimate literary agents do not charge reading fees. That is all there is to it. Anyone pretending to be an agent who asks for a reading fee or a payment against expenses is not on the up and up.
Legitimate agents make their money from commissions on sales.
They don't get a penny until they have collected money for the author from a publisher. Vanity presses, self-publishing, and subsidy publishers are not always scams. Under certain circumstances self-publishing or subsidy publishing might be a reasonable way to proceed, but almost no novels or general interest books meet those circumstances. There are a number of ghostwriting, book doctors, and editorial services that prey on aspiring writers. Some of them even go so far as to set up dummy agencies to give themselves referrals.