My Freudian psychology is a bit rusty, but the id, superego, and ego are the three main divisions of the self/personality. The id is responsible for impulsive thoughts and actions and is associated with a more animalistic and instinctual personality. The superego is the moral compass of our self and is very critical of the id’s tendencies, while the ego is the rationale part of our personality. The part that mediates between the other two, and the part that we expose to the world.
The joke is just a spin on the word “id”, and nothing more