The story in Dark Souls is vague, and you only really get bits and pieces of it that you kind of have to align, and even then it doesn't make a heck of a lot of sense. I pulled some of this from Wikipedia, and others from plot discussion threads. Since the plot is sort of underdeveloped, canonical sources are hard to come by.
Some plot spoilers (I guess?) follow:
A long time ago, dragons ruled the world. The Fire of Lords was lit, and Lords and humans came into the world, although no one remembers how. The first Lords conquered the dragons and began a golden age called The Age of Fire, where powerful Lords/gods rule over the world. The Age of Fire only lasts as long as the Fire of Lords is lit. As the fire started to fade, Gwyn (one of the first Lords who conquered the dragons) linked his soul to it to keep it burning. There is some speculation that this event caused some bad side effects, including the Darksign.
Here's where the protagonist comes in. You are "destined" to replace Gwyn's soul as the soul keeping the fire burning. Most of the things you are fighting are descendants, consequences, leftovers, or failed experiments of the original Lords. At the end of the game, you can choose to take over and continue the Age of Fire, or end the Age of Fire and bring about the Age of Darkness (thereby giving humans dominion).