Check out the above videos (both of them) because they're both good at explaining it. Then consider this, with a FWD vehicle the power is going to both front wheels and with a RWD vehicle the power is going to drive both rear wheels. However, as mentioned in different ways in the videos, an open differential allows power to follow the path of least resistance. This means if one wheel has total grip of the ground beneath it, and the other one has almost no grip, then the wheel with no grip will spin and the vehicle wont move. That's because the power is following the path of least resistance, and it's easier to make a tire spin without grip than it is to spin a tire that has to overcome the force of moving the vehicle as it spins.
There are different types of differentials (locking, limited slip, etc) that work in different ways to prevent the tires from completely spilling. Ultimately what they're doing is limiting the amount one tire can can spin. Some will force power to be split 50/50 between the wheels, some will always ensure that some level of power (but not necessarily 50%) is always going to each wheel.
It goes beyond the question, but some vehicle systems don't even use the differential itself. The vehicle senses that one tire is spinning, and will automatically apply the brakes to just that tire. This reduces the path of least resistance for the energy to flow to, forcing some energy to go to the other wheel. This will result in the other wheel either getting enough energy to move the vehicle, or getting more energy than the friction/grip can handle and causing that tire to spin in place, or some combination of the two.