The climax is the most intensified point in your story that's reached when there’s a major struggle between the protagonist and an external force (e.g. an antagonist, or even the protagonist himself), or a crucial decision is made that leads to a turning or breaking point within the story. Denouement is the final part of your story where all (or some) issues are resolved due to the struggle or ‘rising action’ that leads to the climax, which finally leads to the Resolution.
RISING ACTION → CLIMAX → RESOLUTION (DENOUMENT)
How does the WHAT (theme) in your story get resolved? By finding a solution to the HOW, by turning it around, or presenting another opportunity that 'puts the situation to shame' and creates an opportunity for the protagonist to turn their situation around for a better purpose/cause, if they choose to.
Needless to say, not all literary works end happily or reach solutions to their underlying issues, so you don’t necessarily have to have a solution to the issue that your theme is addressing. However, a resolution is needed for all works as this is a sort of ‘agree to disagree’ situation, whereby all remaining characters come to an agreement (sometimes unspoken) regarding the issue(s).
Let’s use the hypothetical theme of Loss to further explain the Resolution vs Solution elements:
Protagonist: John Doe
Theme: Loss of identity
The How (how did we arrive at the theme?): John Doe loses his business during the Great Depression, and starts feeling less confident in himself, blaming himself for his predicament. Shortly after, his wife leaves him for a younger, richer man. He falls into depression, and loses his sense of self.
The solution John Doe wants: to win his wife back OR marry another wife and get another job
Climax: An event leads him to an epiphany, and he gains resolve and determination
Resolution: 1) John accepts his loss, forgives his wife, and regains his confidence by going on a journey of self-discovery; 2) He goes back to school to learn a new trade; 3) He takes on a different kind of job that’s mind-stimulating and challenging
As the above hypothesis plays, John Doe did not get the solution he wanted, but instead he gained something even better, something he needed for himself – self-worth, confidence, tenacity, and endurance.
To round off your book, you need to create a powerful climax that’ll get readers sitting at the edge of their seats, wondering what’s about to happen. This is the point where you decide how your story is going to end. Is it going to be a sad or happy ending? Will John get what he wants (money and wife), or will he get what he needs (self-identity and self-worth), or perhaps both? How will he get to this point? Make sure that the events in the beginning and middle of your book leads up to this point.
Don't allow your book to end abruptly (unless a sequel will follow). Ending your book suddenly doesn’t create mystery, it simply creates frustration for your readers and will likely cause them to avoid your books in future. There are ways you can end your book without a proper ‘goodbye’, but with a resolution in place; this is the method that gets your readers thinking about your book long after the last page, wanting to read more works from you.
There's a nice article on writing great endings here. Happy writing!