There are many common ways that an author can end a story. If you consider a traditional plot diagram (also known as the plot pyramid or Freytag's pyramid) which consists of the five main parts including Exposition (or background), Rising Action, Climax, Denouement (or falling action), and Resolution, a book or story which follows this traditional pattern might end with a resolution. In that case, the main climax, situation, problem, or plot line ends firmly and can go no further. A resolution like this could be in the form of a happy ending or a sad ending for the main characters.
Take for instance the novel To Kill a Mockingbird, which has several subplots. Tom Robinson's subplot ends when he is shot and killed while trying to escape from prison. Tom cannot appeal his guilty verdict, and his trial will not go on since he has died. His plot line has ended (though not in a happy way). Contrast that ending with the ultimate ending of the book when Scout and Jem are rescued by Boo Radley. They get to meet Boo, who they've been fascinated with for a long time, their enemy (Bob Ewell) is killed and can no longer cause them harm, and the book ends with all the characters safe and at home where no more harm can come to them. In this case, all conflicts have resolved in the form of a happy ending.
Sometimes, though, authors deliberately don't give their readers a resolution. When a story ends without resolving some of its main conflicts and questions (thus leaving the reader "hanging"), it's called a cliffhanger. Have you ever had an episode of your favorite TV show leave you wondering what will happen next or a movie end with a big question that will likely be answered in the sequel? These are examples of cliffhangers, which also occur in novels.
Usually when an author ends with a cliffhanger, they are setting the reader up for the sequel (as in the case of Catching Fire in the Hunger Games trilogy), but sometimes authors leave the ending open-ended so that readers can decide, debate, and speculate on what might have happened after the last page.
To recap, two techniques authors can use to end their stories are resolutions (which can be either happy or sad) or cliffhangers.