A coffin is an oblong box, usually made of wood, in which a corpse is buried.
In 2154, the coffins of the Human casualties of the United Earth Embassy bombing on Vulcan were lined up in the cargo bay of Enterprise NX-01, draped in the United Earth flag, ready for transit back to Earth. (ENT: "The Forge")
In Starfleet, in the 22nd and 23rd centuries, it had become something of a tradition to place the bodies of dead crewmates in the empty casing of a torpedo, much like a coffin, before launching them out into space. (ENT: "Similitude"; Star Trek II: The Wrath of Khan, DS9: "The Sound of Her Voice", "Tears of the Prophets", VOY: "Latent Image", "One Small Step" et al)
In 2365, Emissary K'Ehleyr referred to a modified class 8 probe as a coffin after she endured a trip at warp 9 in it, in order to rendezvous with the USS Enterprise-D for an important mission. (TNG: "The Emissary")
In 2370, Doctor Beverly Crusher read an eulogy before her late grandmother's coffin on Caldos II, with Counselor Deanna Troi and Captain Jean-Luc Picard by her side. The coffin was later beamed back from the underground to scan Felisa Howard's dead body for anaphasic energy. (TNG: "Sub Rosa")
In 2374, Lieutenant Tom Paris, expressing reluctance to enter a stasis unit, complained "Why do they have to design these things like coffins?", an expression of his claustrophobia. Later, after the Voyager crew was revived, he commented "we would've died in those coffins" had it not been for the heroic actions of Seven of Nine. (VOY: "One")