I think there are a variety of things that can be done, as other people have mentioned, such as being concise, and just listening. One thing that helps me is that my husband will call me out on it. He'll say "squirrel" when I drift in the conversation. If you have an SO or good friend that's willing to call you out on it, to start noticing it, that can be a good thing. One thing I do is try and limit myself from telling stories that may (in my mind) relate to whatever the topic of discussion is, because 1. my story probably doesn't relate, or the connection is too thin to be understood and 2. people probably don't want to hear it anyways. Another thing to remember is that it isn't inherently wrong to wander off topic in conversation, unless it is a directed conversation, such as a business meeting, etc.