The exact fate of Earth as the sun becomes a red giant is somewhat uncertain because of two factors.
The first is that as the sun expands, its surface gravity $GM_\odot/R_\odot$ will decrease and gas can more easily escape as solar wind. This will reduce the mass of the sun, making Earth's orbit spiral outwards. But how much expansion depends on details of the far future solar wind we do not know yet, and this makes it slightly uncertain whether Earth can get into an orbit beyond the maximal solar radius. (The gas will also produce some drag, but it is likely negligible in this case)
The second factor is tidal interactions. As the sun expands it rotates more slowly, and in particular will rotate slower than Earth's orbital speed. That means that the tidal bulge induced by Earth will always be trailing the planet, creating a backward pull slowing it and dragging it inwards. This effect is small when the surface is far away, but grows rapidly as it approaches. Hence the sun can gobble up Earth even if the orbit is larger than the solar radius - but much depends on somewhat weakly understood tidal interactions.
Once the planet is inside the envelope it will rapidly get dragged in. To get a timescale, consider the time to push aside an Earth mass of gas: $\tau = M_\oplus / \pi R_\oplus^2 \rho v$. For $\rho=$ 0.1kg/m$^3$ I get $\tau=0.4972
$ years. Maybe a bit longer if the orbit got wider and slower. Since the density of Earth is much higher than the gas, the planet will not be tidally disrupted but instead leave a hot plasma wake (that paper has more detailed calculations of infall timescales etc.).
The shocked gas will form a plasma sheath that erodes the planet at some rate, leaving a trail of metal-enriched material. Eventually the gravitational potential energy is released as heat, but this is mixed up with the rest of the solar luminosity over maybe a million years or so.
If Earth survives the giant phase it will orbit the white dwarf core (at a distance set by mass-loss expansion of the orbit minus gas drag inspiral; about twice the current orbit if drag is small). At this point it will become an airless (due to luminosity-induced atmosphere loss earlier), frozen rock over a few hundred million years or so as it cools from earlier heating.