and how to prevent it
Whoa, what is spam?
Those junk emails that you receive are considered spam, they are advertisements, coupons, fake insurance, and fake giveaways. Companies sell your email address to spam companies to make more money, that is why you receive it. There are not many ways to prevent it, you can have a separate email that you give to stores and other places, a lot of businesses also have a special server that the receiver has to accept emails from the sender.