Pathfinder's rules for magical darkness are complex and weird; I am deviating from them a little bit to get something easier to run and more in line with what I picture when I think of magical darkness.
First, note that Darkness and Deeper Darkness as well as Light and Daylight can all be used to counter (meaning, as a counterspell) or dispel (meaning, as Dispel Magic except it always works) any spell from this set of the opposite type of equal or lower level.
Magical darkness suppresses sources of illumination and some of their effects, and it lowers the ambient light level. The ambient light level is the illumination from the sun, moon, stars, Northern Lights, or other very distance sources; it does not include anything else – in a cave the ambient light level is "dark" regardless of how many candles there are. Any type of illumination that magical darkness suppresses, it also blocks – that means you can't see a candle if there are one or more magically dark squares between you and the candle, even if neither you nor the candle are in the darkness. You cannot see out of magical darkness unless you are in an edge square of the effect.
The illumination from mundane light sources (and magical light sources of the same or lower level as the magical darkness) is completely suppressed inside an area of magical darkness. If they are outside the area, they do not illuminate anything inside the area. Here I will also extend the rules a bit and say: a suppressed light source inside the area of magical darkness is not visible, nor does it cast any illumination outside the area.