SELECT * FROM msg where sender = receiver
is not a self join.
Self join is just like any other join, except that two instances of the same table will be joined in the query.
It's quite common when you have a table that references itself. Example: an employee table where every employee can have a manager, and you want to list all employees and the name of their manager.