I always talk about random stuff or an irrelevant topic. How can I fix it?

I always talk about random stuff or a irrelevant topic. I am 24 years old and sometimes just throw a random topic off my head when I am with a group of people talking about a other topic. How can I control my random stuff talk or irrelevant topics? I am sick of people looking at me like I am nuts cause I throw a random different topic into their conversation.
I always talk about random stuff or an irrelevant topic. How can I fix it?
Post Opinion