Pooping correctly?

I haven't been pooping properly...I poop every 10 minutes and it's almost like diarrhea but it isn't that because it's not every day and I when it happens it's only for like 2 hours and then it stops. Is this bad? Is this connected to something else?