When you chat or talk with someone, you or the other side person can use this term. Simply put, XD means they are in a happy mood, and by sending you this, they spread laughter.