Egoism (also known as psychological egoism) is a philosophical concept in which the motivations and instincts for an individual's behavior are based on their own self-interest and welfare. It is the belief that all of our behaviors and actions are based on the benefit that we will receive from it. This is contrasted with psychological altruism which proposes that some human actions are based on the desire to help other people.
So let's say a person sees a child in the street as a vehicle is speeding towards them. The person runs and grabs the child saving it from being hit by the vehicle. The psychologically altruistic view of this action would be the person saved the child as a caring good deed towards the child with no regards for their own safety. The egoism viewpoint would be the person saved the child for their own benefit - they are heralded as a hero, they might win an award, they would have been socially judged if they hadn't attempted to save the child, etc.