Legal custody pertains to your right as a parent to make important life decisions for your children. These decisions can include medical treatment, choice of religion, and choice of schools.
Physical custody pertains to your right to have your children physically reside with you. The parent with whom the child is residing with on any particular day makes basic day-to-day decisions for the child, such as bedtime, what to watch on TV, how much time to spend on homework, etc.
Parents can share legal custody, meaning both parents share in the decision-making process for important life decisions, or one parent can have sole legal custody, meaning one parent makes the important life decisions alone, without any responsibility to even notify the other parent of those decisions.
Likewise, parents can share physical custody, or one parent can have sole physical custody. It’s also possible for parents to share legal custody while one parent has sole physical custody, or vice versa.