Your question is off-topic, as it's not directly programming related, and it's also a fairly large question. You may get faster and more detailed answers in a web search.
Mail servers will not accept emails without a sender. This is because in case they cannot deliver the email, they need to bounce it (return it to the sender). You can leave out the FROM: header, and that may make you look like a spammer or poor sender, but you need to pass a MAIL FROM: <me@example.org> SMTP command when you try to deliver mail; see RFC 5321
You can generate any email address you want (see RFC 2822 for syntax details). The receiver has no way to tell whether that is a valid email address. Only your (incoming) mail server decides whether to accept mail for an address. If you run your own email sender you're in charge of the addresses.
If you don't run your own email server, you can use someone else's, like Google or sendgrid. In that case these companies assign you email addresses you can use, and they will require you to log in before you can send, so that others cannot send in your name. (Imagine if everybody could send emails coming from your bank.)
Spammers either run their own mail server, or abuse poorly configured mail servers that allow relaying for others (open relays), or sign up for email services and blast out as much as they can before the email service provider kicks them off of their platform.