If you could travel back in time in your own universe, you could create a grandfather paradox. You can't resolve this paradox (that's why it is one), so logically, you simply can't travel back in time in your own universe, just like you can't divide through zero. If they didn't say so on the show, maybe the characters weren't aware of it. After all, they often complained about migraines in connection with temporal mechanics...
Every time you think you are timetraveling, you are actually hopping universes, emerging at a point in that universe's timeline that is analogous to a certain point in time in your original universe, so that it seems you traveled "back". Actually, you're still in the present, only that the original universe's present and the parallel universe's present aren't the same.
And for people who feel the need to remind me that this is fiction: I know. But when discussing things inside that fictional universe's reality, I'm not going to insert "fictional" after every other word, because it would make the post unreadable. Just assume that I'm not that deluded to think we're discussing our reality.
Perhaps I should make this my sig. Would save a lot of typing in every third post...
Fictionally, in Star Trek, that's not how it works. Because we've seen the timelines altered before our and our characters very eyes without them traveling at all.
They get around the grandfather paradox by 'cutting' an imaginary time thread connected to the characters. Usually the act of time travel is what causes this cut, so that alterations to the timeline won't effect them. They often go to the trouble of explaining the 'cut' with techno-babble.
A really sloppy example is Back to the Future. Marty has to set things straight so that he doesn't cease to exist. So obviously changes he makes in the past effect his personal timeline. But then when he does return home his life has changed, his family members now all successful in life and Biff their car-washing lackey. Yet his personal existence remains unchanged. It's completely contradictory. (don't read the previous paragraph if you haven't seen BTTF)
They further screw things up in BTTF2, where Biff changes the timeline but somehow it doesn't take effect until Doc and Marty return to 1985. And Marty no longer has to worry about his own existence at all. (^ditto)
I bring all that up just to point out how it doesn't matter that they get all the time-traveling 'wrong,' they're still great stories.
---
Now in the real world, assuming timetravel is even possible, a paradox of that nature would never happen because there is only one sequence of events. The past can never be changed, it can only play out the way it played out. If someone goes to the past and does something, then it's already happened. There is no 'original sequence' so to speak. There is no Back to the Future.