(Covers information from Both Timelines)
The coffin was supposed to contain Jack's deceased father, Christian. Jack was originally not allowed to bring the coffin on the plane as he lacked the proper documentation. Jack pleaded with the Oceanic Airlines ticket agent, Chrissy, saying that he had the funeral all set up and needed to get his father on the plane so it could all be over.
Jack found this coffin near the entrance to the caves. Jack found it closed, and opened it expecting to find his father, only to find it empty. He then broke it to pieces with a metal pipe. ("White Rabbit")
Jack came across the coffin again while on his way to the Lighthouse along with Hurley. As the two made a brief stop at the caves, Jack revealed to Hurley that he was the one who had smashed it because "he wasn't in it". ("Lighthouse")
In the flash-sideways timeline introduced in Season 6, Flight 815 landed safely at LAX, but Christian's coffin and Christian himself were somehow lost, much to Jack's irritation. ("LA X, Parts 1 & 2") Jack was later told that the coffin possibly was shipped to Berlin. ("Lighthouse") Finally, the coffin arrived in LAX on the day of Daniel Widmore's concert. It was transported to a church, where Desmond Hume signed for it. That night, Kate brought Jack to the church. He entered a side chapel, where he found the coffin — empty. He then met his father, who explained the nature of that reality. ("The End")