In Supernatural season 04 episode 19 Jump the shark the body of Adam Winchester was cremated by Dean and Sam at the end. But in the final of season 05 Swan song he has been shown coming out of the grave. And later Michael possesses his body. How his body was in the grave?
The angels brought him back, body and all - which apparently they can do.
You correctly point out that he was cremated by his brothers, Sam and Dean. In Point of No Return we see his return:
He awakens in the ground near where his funeral pyre was. Castiel brings him to Bobby's house where he converses with Sam and Dean about why he is back:
So he was pulled from heaven to be the vessel of the archangel Michael. He had to be given form first, so the angels gave him his body back (which apparently they can do). He was then supposed to say yes to them - although we later learn this was all an elaborate ruse designed to lure Dean into a situation where he had to agree to being Michael's vessel.