When you "play a trick on" someone, it means that you tell them a funny lie, or do something to surprise them.
This isn't usually done in a mean or harmful way. Usually "tricks" are done to make everyone laugh, including the person who is being tricked. But you can also use the phrase "play a trick on ___" to talk about mean or hurtful tricks.
In American culture, people who are good friends or family sometimes play tricks on each other, although there are certain people who don't do this and don't like being tricked.