To be honest, kids are self-centered. Ask your preschooler to choose between two cookies when he has a friend over, and he'll pick the bigger one for himself. Ask him to take turns with a toy, and he'll exclaim, "My turn first!" It is possible to change the "me first" attitude by helping your little one to stretch his thinking and consider the needs and feelings of others.
Next time your preschooler does something selfish, teach him to think about the other person involved using role play. For example, if your child grabs a toy from another child and shouts, "My turn!" remove him from the situation and reverse the roles. Hand him his favorite toy, and then grab it from him as you shout. Ask him how this made him feel, and discuss better ways to handle the situation. When you have discovered a more appropriate way of handling the situation, replay the scene again so that he is able to practice this new, kind behavior.
Teach your preschooler to put the needs of others first. When it's time to serve dessert, put her in charge of serving her family and friends first by having her carry the plate of cookies to everyone before she selects hers. Don't kid yourself -- this activity might be met with a lot of resistance at first. You'll need to follow up her service with lots of praise and thanks for her selflessness.
Talk with your preschooler about some people in your life who may need a bit of help or cheer. Do you have a lonely, elderly neighbor? Is your child's classmate at preschool sick with the flu? Does he have an older cousin who is away at college and feeling homesick? Have your 4 year old take freshly picked flowers to the neighbor, color a card or picture for his classmate or help you make cookies to send to his homesick cousin.
Whenever your child is given something, use it as an opportunity to teach her to give back to those less fortunate. Upon receiving a boat load of toys and presents for Christmas or a birthday, help her select one of the gifts to donate to a homeless shelter or other appropriate organization. Using simple language at her level, teach your child about a few charities -- perhaps a charity that helps people who are sick or a charity that helps girls who can't afford to go to school. Have her pick one of these charities to donate a portion of her allowance or tooth fairy money, and explain to her what sorts of things her money will be used for.