The ego works based on the reality principle which means it tries to satisfy the id while still considering the superego. For example, if a guy likes his classmate, and his superego doesn't even want to interact with any girls because it would be impressing and inappropriate and the id wants to jump into the sexual pleasure, the ego might come in and solve the problem by simply asking the girl how was her day.