You have what is called a "Switch leg" Power goes into the box that the light sits in, and switched from the light switch. White on the fixture goes to the black on the switch, Black goes to the Red on the switch. This is why you either write down on paper what goes where before unhooking, or leave connected, until you get the new fixture. Never unhook until you make notes of how it was hooked up.