It depends on the story. I usually like to seal off any loose ends - perhaps leaving one or two for the purposes of intrigue - and give a sense that the story is not actually over. I see my writing (or at least the writing that I post online) as a craft of entertainment, and as such I try to end and leave the reader wanting something more; for that reason, a lot of the stories I post here end with a sense that just because I have finished writing doesn't mean that the story itself is over - that life goes on, and with it new adventures.
If I do want to close something neatly, then I might parallel the words or phrases I used at the beginning, to contrast how far my characters have come from their initial positions; more than once, I've used a kind of sustained cataphora - that is, references to something that has not yet happened - to create a sense of subdued interest running through the final pages so that I can reveal something at the end, thereby giving the reader some sense of closure, real or imagined.
In short, ending stories - as I'm sure you've found out - is hard. I've never ended any two exactly the same way - or, if I've ended up concluding them in similar ways, it's only because I worked from two different positions that brought me to closely-related conclusions. The only general statement I can make is that a story is finished when there are no more words left to write. If everything is there, it's done. Sometimes, just leaving it at that, a simple ceasing to write, can be more effective than a more crafted ending. But again, as I said at the start, it depends on the story.
This... hasn't exactly been the world's most helpful post, I suppose, but hopefully it's got some ideas about how you might start thinking about writing an ending in it.
EDIT: Is killing off the main character a cliché? I'm not sure I've read more than one or two books where the main character just dies at the end, and those weren't exactly good books. Maybe the practice is more common in fanfiction; either way, I'd probably advise against it unless the story specifically calls for it. I don't think singular protagonists are really made to die.