Answer:
It starts to decay immediately and attracts flies first. It depends on the environmental conditions on how long it takes it to completely decompose. It can take several weeks or even months.
Extra:
It takes about a year for the body to decompose to a skeleton and teeth. The process of decomposition slows if it is in a casket.