What is the difference between legal custody and physical custody?

Legal custody has to do with the way parents make decisions about a child's education, religious training, discipline, medical care, and any other important matters that might effect a child's general well-being.

Physical custody is more straightforward and has to do with the physical care of a child; where the child will live and sleep.