What does a man mean when he tells ex girlfried he is with someone?

That he either wants to make them jealous or he's trying to get the ex to leave him alone and get the message that he's over her