Keep a mental list of questions that have some depth to them. I avoid "How are you?" which usually results in a bland response of "Fine, thanks", and instead ask "So, what have you been up to lately, anything new going on in your life?" because this indicates that you want a more detailed response and allows the other person to pick specific activities in their life that they may want to share and discuss.
If it's a random chatroom, just start asking questions. Where are you from? Do you like it there? Do you go to school or work? What tv shows do you like? Etc. When they respond, give longer feedback.
---
"So, where ya from?"
"Cali, u?"
"Oh, I'm from Nebraska"
---
^That's not a very productive conversation. Instead try:
---
A: "So, where ya from?"
B: "Cali, u?" [Now at this point, what do you know about California? Make some remark or opinion about it, give in-depth feedback.]
A: "Isn't Cali mostly hippies and plastic socialites?
Are you near the ocean? I'd love to be on the beach right now, it's like 50 degrees up here in Nebraska where I live." [Then, if the other person is a decent conversationalist, they'll do the same: give a detailed response, and then ask some questions that give you an opportunity to tell them more about yourself.]
B: "I used to live in a laid back little beach community in SoCal, stoners and surfers. The sunsets over the Pacific were awesome, I always tried to take photos. I just moved back to SF tho, it's a totally different culture here than in SoCal. I have a friend that was from Nebraska and he didn't like it much, he said it was really boring. Is there much to do there? I've never visited the Midwest myself, although I'd like to someday just to see what it's like. What do you like to do for fun anyways?"
---
^Say more rather than less. Balance talking about yourself with inquiring/commenting on the other person so the conversation doesn't become all about you or all about them. Introduce broad potential subjects in the course of conversation, but make it natural. I've mentioned 2 US states, a sport (surfing), a hobby (photography), cultural issues (socialites, hippies, yuppies), a life event (moving), travel, etc. Unless you're talking to the most boring person in the world, they'll be able to find
something of interest to discuss with so many potential leads. Eventually you'll hit upon common ground, or at least learn more about the other person. Single-line responses can only go so far, you won't see the full picture of what the other person is like with overly-simplistic replies and you'll never really connect with them or move on to deeper and more interesting conversations.
If it's on a forum, view their profile and make a note of anything that stands out: If they mention liking literature in their profile, ask them about their favorite novel or author and so forth. Show an interest in their lives.
If there's a lull in the conversation, have something in mind that's kind of random but interesting to discuss. Maybe a recent news event or some problem in your life, etc.