I read that EOS has zero transaction fees. How is spam prevented from someone just sending a bunch of eos to themselves to clog the network? And what is the purpose of the EOS coin if not the prevent spam?
Just think of a highway road with different lanes, one can access to his only lane with the amount they stake in n/w. If no one using lanes you can use that resource , but every one using you are guaranteed with minimum of what you staked. There is no way to spam others than the lane you own ,your capabilities locked to it.
For every transaction you perform on the network, it requires CPU and bandwidth which you can only get it through staking EOS tokens.
The amount of CPU and bandwidth you get depends on how much EOS tokens you stake.
If you spam the network with transactions, your allocated CPU and bandwidth will get depleted eventually and you will not be able to perform any transactions unless you stake more tokens or wait until your resources regain by itself.