It has nothing to do directly with your computer.
Email is not sent directly in/out from our computers to the destination.
All our email activities are going through the email server of the email service providers.
The spammers find ways to “mess around” with the servers.
The spammers harvest email addresses and fake the from addresses, it is a way to avoid some anti-spam filters.
That said you should scan your computer periodically just to make sure that there is No Trojans, and Malwares sneaking upon you.