Unless you mean that they take place within 12 months of each other, they don't: "Star Trek II: The Wrath of Khan" and "Star Trek III: The Search for Spock" both take place in 2285, "Star Trek IV: The Voyage Home" in 2286, and "Star Trek V: The Final Frontier" in 2287.
Wrath of Khan, Search for Spock, and Voyage Home form a loose trilogy all linked by the Genesis Project. The actions of Khan Noonien Singh result in the creation of the Genesis Planet and the death of Spock. (ST II)
Very soon after, it is realized that Spock can be resurrected, so Kirk and crew hijack the Enterprise to return to the Genesis Planet to retrieve Spock's body. Meanwhile, the Klingon Commander Kruge also travels to Genesis to steal the technology to use as a weapon. Spock's body is found, but the confrontation with Kruge destroys the Enterprise, forcing Kirk and crew to commandeer the Klingon ship. (ST III)
On their way home in the Klingon ship, the crew is sent back in time to 1986, where they must retrieve humpback whales to prevent an alien probe from destroying Earth in 2286. Once they return to the 23rd Century, the crew faces a court martial for their actions in the previous movie. However, due to Kirk pleading guilty and for rescuing the planet from the Whale Probe, the charges are dropped, except one charge against Kirk for disobeying a superior officer. He is demoted back to Captain for this. (ST IV)
"The Final Frontier" does pick up where "The Voyage Home" leaves off, with a newly-demoted Captain Kirk taking command of the new Enterprise-A. The rest of the story, however, is not directly affected by the past movies.
They don't, although they are set very close together as 2, 3 and 4 are more like continuing parts of one story than seperate stories. Wrath of Kahn and The Search for Spock were set in 2285. Star Trek 3 followed on directly from Star Trek 2. The Voyage Home is set in 2286. It follows on from the end of Star Trek 3 but crosses into 2286. The Final Frontier was a seperate story and was set in 2287. There was a larger gap between 5 and 6 as The Undiscovered Country was a seperate story and was set in 2293 as was the Prologue of Generations. This timeline is based on the Star Trek Chronology model supplemented by data from startrek.com.