I tried to figure it out with some quick googling but it needs more detailed analysis. There is a lot of info available online, such as the Bristol stool chart. You can also talk to a doctor to try to figure out if it's coming from an underlying condition such as irritable bowel syndrome.
it probably has some cause, but whether that cause is something that can or should be given some type of treatment is something you and your doctor need to figure out.