Since this is a collection of short stories, we are actually dealing with thirteen separate endings here. However, there are definitely common elements in the ending to all these separate stories. The stories featured here are always neatly tied up in true detective show fashion. This makes sense; Holmes, after all, is pretty much the father of all modern detective shows and books.
At the end of a Sherlock Holmes story the bad guy has been caught; the bad guy makes a full confession; Holmes fills in any blanks in that confession and explains exactly how he used his gigantic brain to solve the crime; and Watson sometimes chimes in with some epilogue details, letting us know that a wounded person survived for example. The technique of having the hero-detective stand around and explain everything to everyone else can still be seen on tons of detective/legal/cop shows, from CSI to Psych.
It's worth noting that not every Sherlock Holmes story ends with the same tone though. Some cases are more gruesome or more depressing than others. Sometimes Holmes and Watson arrive too late to prevent a death. Other times they reveal that the case isn't all that serious and is actually rather humorous. So in the end the villains may always, in true Scooby-Doo fashion, confess all and gripe about those "meddlesome kids" Watson and Holmes. And Holmes may always stand around explaining everything to the audience. But what these characters say, and how they say it, differs from story to story.