Alternate history occurs when somebody makes a slightly different decision or a key event just gets lost in the shuffle. But sometimes history changes when time-travelers drop by! Here's what AH literature teaches us to do (should we ever time-travel).
First off, survey the situation. It can be hard to steer history too far astray if you're only shot back a few decades, but the further back in time you've gone, the more likely it is that you've created an alternate timeline just by showing up. Take for instance one of the earliest alternate history novels, L. Sprague de Camp's Lest Darkness Fall, in which a modern protagonist is thrown back in time to Rome in 535 A.D. and ends up preventing the Dark Ages. While some of the hero's attempts to recreate modern technology succeed, he mostly changes the timeline with his knowledge of history and some modern tactical know-how.
Second, did you come with friends? If so, then sit down and have a real heart-to-heart about how you're going to deal with the situation right off the bat. What are your feelings on giving advanced technology to primitive cultures? Or on exploiting your knowledge of history for personal gain? These things WILL come up and it's best to just be upfront about it. And heaven help you if you're sent back with a whole community. Don't even try to preserve history if you've got more than three or four people going back in time with you. There's always going to be at least one sociopath that figures out that he or she could rule the iron age with knowledge of gunpowder and even if they don't succeed you can be fairly certain they'll change things up pretty significantly.
Take, for example, S. M. Stirling's Island in the Sea of Time and the subsequent books in the Nantucket Series. After the island of Nantucket is mysteriously sent back in time from the year 1998 to 1250 B.C., a lieutenant named William Walker (history nerd joke ahoy) manages to parlay a few guns and a coast guard ship into an empire that spans continents. In order to keep him from taking over the entire world, the people of Nantucket end up creating an empire that resembles British colonialism a few thousand years early.
While they lack the sheer malevolence of William Walker, the people of Grantsville, West Virginia end up doing nearly as much damage to the timeline when they're sent back to the era of the Thirty Years' War in the expansive and largely collaboratively written 1632 series, organized and often co-written by Eric Flint. Rather than keeping a tight control on their future technology and knowledge, the people of Grantsville end up getting modern history texts widely read in European courts and significantly altering Europe's timeline in just a few years.
This is all assuming you haven't gone back in time on purpose, which is really for the best. If your trip was intentional, then you're probably doomed to failure as in Steven Fry's Making History, where a successful attempt to kill Hitler before he was born just results in a more competent Nazi Germany. Or the classic Ward Moore story "Bring the Jubilee," where a time-traveler from a history where the South won the Civil War goes back to study the war and accidentally creates our timeline. Thankfully, even huge jerks like the white supremacist time-travelers of Harry Turtledove's Guns of the South or Harry Harrison's A Rebel in Time run into problems with their plans to give the Confederacy advanced weaponry.
If there's any lesson we can take from all this, it's that history is a big, unwieldy thing that never goes the way you want it to, even with foreknowledge of events. Unless of course you have a huge temporal agency dedicated to changing the timeline, but that's a topic for another post.
[Comics via xkcd by Randall Munroe.]