That is the 1986 movie Stand By Me, starring Wil Wheaton, River Phoenix, Corey Feldman, Jerry O’Connell and Kiefer Sutherland. It was directed by Rob Reiner and based on Stephen King’s short story The Body, which was included in his collection of short stories called Different Seasons.
King considers this movie the first successful adaptation of any of his works into a film.
Two other short stories from that same book were made into movies at a later time. Rita Hayworth and Shawshank Redemption was made into the 1994 film Shawshank Redemption and Apt Pupil was made into a film by the same name in 1998.