For starters, that depends on the context of the chats. I am not going to cast any aspersions one way or the other, but unless you know for sure, it could be anywhere from casual conversation about completely platonic matters to full on nightly cybersex. Also, everything I am about to say applies to both men and women, I will not characterize any of it as being typical of one sex or the other.
It could be exciting
Anyway, if it is something romantically-related, it can be a few things. The first is the obvious: they could be looking for something else, or at least looking for some excitement on the side. I think this is the conclusion most people will jump to, and it could very well be true, but there could be other things at the root here.
For self validation
It could also be them seeking self-validation if they feel like things aren’t going great with your relationship. Ever hear the phrase, “I don’t want them, I just want them to want me like in a sex chat room?” That’s the essence of what I am talking about here: they may not actually be looking for an active alternative to you, but do feel like there is something lacking in the way you regard him or your relationship.
Seeking reassurance
If they feel like you’ve lost interest or don’t really care that much anymore, then this may be them seeking reassurance that they’re not as unattractive/awful a person/disposable as you make them feel. They may have no intention of ever meeting anyone they connect with online, or doing anything dirty on their webcam, or anything like that. They are just in it because they need to feel like someone is attracted to them.