It seems as though some children are born with the ability to walk up to another child, invite them to play or simple begin playing with them and a friendship naturally occurs. Other children may not have that skill and it needs to be modeled to them. Some children have a tendancy to hit another child or take something from them--this is their form of communication saying "will you play with me".
Within our classroom communities we talk about how all children are different and we are all friends at school. Translation: We are polite, kind and inclusive in the classroom and at play time. This does not mean that your child should have a playdate with every single child in the class because "we are all friends". Some personalities click, some do not. If you would like your child to work with or engage more with differnt children at school, perhaps begin that conversation in the home. Rather than instructing your child not to play with another child, challenge them to be kind to a new/different friend today. Take time of the dinner conversation or bedtime routine to followupabout who they were a friend to througout the day.