Carrying and burying the deceased is fardh kifaya.
However, wrapping, the procession and burial do not apply to a non-Muslim (except for burial if there is no one else to do it).
It is makrooh to accept payment for any of that or for washing the dead.
It is sunnah for those on foot to be in front of the body.
And those on mounts behind it.
Being closer to the body is preferred.
It is makrooh to stand for it.
It is makrooh to raise any voices in the procession, even if with dhikr or recitation of Qur'an.
It is sunnah to dig the grave deep and wide.
The minimum requirement is that which prevents predators and smells.
It is makrooh to place anything in the grave made of wood or anything baked with fire (e.g., ceramic)
It is makrooh to spread anything under the body or to put a pillow under its head (contrary evidence)
It is sunnah for the one placing the body in the grave to say: (بسم الله و على ملة رسول الله) - bismillah wa 'alaa millati rasoolillah, meaning "In the name of Allah and upon the tradition of Allah's Messenger (sas)".
It is wajib to orient the body with its face toward Makka.
It is haraam to bury more than one person in a grave - except for necessity (dhuroora).
Some advocated talqeen ("urging" the dead to say laa ilaaha illaa Allah), the majority did not practice it and the correct ruling is that it is bid'a, not supported by evidence and there is no daleel that the deceased can hear or benefit from such a practice.
It is sunnah to sprinkle some water on the grave.
And to raise it one hand-span above the ground.
The following should not be done with any grave:
any form of decoration
building any structure upon it
scenting it with incense or the like
any writing on it
kissing it
making tawwaaf around it
sitting or leaning on it
spending the night
laughing and talking about worldly affairs there
lighting them
It is haraam to bury anyone in any masjid (also to build a masjid over a grave).
It is haraam to bury anyone on someone's property without permission (and they must be exhumed and removed if they don't grant permission).
Burying the dead in the desert is the best.