At the end of Star Wars: The Last Jedi, Luke Skywalker dies after holding off the First Order on Crait with a Force projection, Kylo Ren becomes Supreme Leader, and Rey is left with the few Resistance survivors.
On Crait, Luke's projection buys the time the Resistance needs to flee in the Millennium Falcon. Luke then dies on Ahch-To after the effort. Only a few survivors remain, and Leia tells Rey the Resistance can rise again. Back at Canto Bight, a stable boy uses the Force to move a broom, hinting that hope is spreading. Kylo is left as the Supreme Leader of the First Order.
How the ending is built. The sequence works as a reversal of the film's own setup. Kylo, who has just killed Snoke and declared himself Supreme Leader, orders the assault on Crait believing Luke is standing in front of him. Only during the duel does he realize he is facing a Force projection, while the real Luke is on Ahch-To. Luke's last stand therefore saves the Resistance without a single blow landing, which is a different kind of Jedi victory from anything in the earlier films. As an opinion, that is the film's clearest statement of its theme: the fight is won by buying time and inspiring others, not by one fighter defeating another.
Comparison with the series. Star Wars: The Force Awakens ended with Rey finding Luke, and this film opens by picking up straight after the Starkiller Base battle, so the two function as one continuous story. Frank Oz returns as the voice of Yoda, which ties Luke's Ahch-To storyline back to the Jedi teachings of the original trilogy, and the film's Luke is a reluctant teacher who admits he once considered killing Kylo. Holdo's lightspeed ram on Snoke's flagship is the other turning point, and it is the moment where the Resistance fleet is cut down to the handful of survivors who board the Falcon.
Who is the very last Jedi? One common reading is that the title refers to both Luke and Rey; the broom scene suggests the Force reaches beyond the Jedi order. Luke is the last Jedi Master and the one who dies, while Rey is the student carrying the work forward. This is interpretation, not something the film states outright.
Production context. The Crait battle scenes were shot on the Salar de Uyuni in Bolivia, and the Ahch-To scenes were built from Skellig Michael plus a rebuilt Skellig village at Sybil Head, because Skellig could not be closed to tourists for long enough (Moviefone, Wikipedia). Principal photography wrapped on July 22, 2016, and Carrie Fisher died in December 2016, so Leia's closing exchange with Rey sits in a film that is dedicated to her.
The controversy around the film comes from its story choices, which turn away from the setup left by The Force Awakens: Luke refuses to train Rey, Poe's attack is punished, Kylo kills Snoke midway through, and the Canto Bight mission ends in betrayal by DJ.