Means joking or teasing someone in a light-hearted and playful manner, often in a humorous or sarcastic way.
“Telling my friend his shoelace is untied when it’s not is like pulling his leg in a fun way.”