Astral Projection is a glitch wherein the position Mario's model is drawn in (his graphical position) becomes separated from the position he's actually in (his physical position) for an arbitrary length of time. This glitch occurs when Mario grabs Chuckya while Chuckya is holding Mario.
Chuckyas have a secondary object called the anchor which is positioned in Chuckya's hands and constantly sets Mario's graphical position to its own. As long as it thinks Chuckya is holding Mario, the anchor will "anchor" Mario's graphical position away, even though Mario's physical position is still at the location Chuckya grabbed him at. However, when Mario grabs Chuckya, the variable that determines whether Chuckya is holding Mario is not reset. Thus, Mario's graphical position will remain separated from Chuckya until Chuckya is killed or an external force causes Mario's position to be reset to his graphical position.
To be able to grab Chuckya, Mario's grabbed action must be interrupted. There are three ways to do this: by being in water (cancelling the grabbed action into Water Plunge), by interacting with lava (cancelling the grabbed action into Lava Boost), and by interacting with a Star or Bowser Key (cancelling the grabbed action into a star dance action).
This glitch cannot be performed with King Bob-omb, even though all the above logic still applies, because King Bob-omb turns himself intangible when holding Mario and therefore cannot be grabbed.
Astral Projection with Water was the first type to be discovered, and can be performed in Wet-Dry World, Tiny-Huge Island, and Tall-Tall Mountain. Cancelling Mario's grabbed action with water allows Mario to almost immediately water-grab Chuckya, without the need to wait for another action to complete like with lava or a star. Another advantage of astral projection with water is that exiting water allows Mario to hold Chuckya light right away, which gives much more freedom in movement.
Astral Projection with Lava was the second type to be discovered, and can only be performed in Rainbow Ride. It was initially discovered by ROMhack players in levels where Chuckya was placed near lava; however it is also possible using the lava in the fireplace in Rainbow Ride.
With a Star
Astral Projection with a Star was the third type to be discovered, and has been shown to be possible in Rainbow Ride and Bowser in the Sky, but is most likely possible in all other stages with Chuckya as well. In this method, Mario is grabbed by Chuckya while holding a cloned star (or otherwise made to collect a star while grabbed, such as by being moved into a star by a platform). The star must be a 100 coin star or Bowser course star so as to not kick Mario out of the level. Then, after the star textbox is closed, Mario can grab Chuckya.
This glitch is not possible off-the-bat because Chuckya can usually only hold Mario for a maximum of ~58 frames (18 + an RNG-based timer from 11 to 40) before throwing him, which is just slightly too short for Mario's star dance actions to complete. However, if Chuckya is facing off an edge at the end of its usual spinning timer, it will postpone the throw for up to 16 frames to make it throwing Mario off an edge less likely. This extra time is enough to allow Mario to grab Chuckya.