It is impossible to prevent someone from sending messages using your address as the sender. The sender and recipient addresses you see in email are just strings of characters. You can use any string you want without affecting the true sender and recipient.
Spammers use the recipient address as the sender address as well because most people don't or can't block their own address.
Receiving this type of message in no way indicates your account has been compromised, by the way. If the messages arrive in the Inbox, mark them as junk. You might want to try creating a rule to handle common strings in the subject or body, but that's
not usually all that effective. If the messages arrive in the Junk folder already, then simply ignore them, since the junk filter is working as it should keeping them out of your Inbox.