If you're going to do an actual pit.
Dig the hole first. Needs to be as close to three feet as you can get it. In Texas that's usually 1 to 2 feet.
Start a fire making sure to find some good sized rocks to put in the fire itself, but make sure they are still accessible.
Shovel coals and rocks from the fire into the pit, place foil wrapped meat and veggies in the hole on top of the coals. Add more rocks and coals and bury. Dig up 12 hours later at dinner time.
I've always had off results, it will cook your food though.
I've seen people use dutch ovens in the same fashion.