The power (from the breaker) is likely at the light fixture. When you hook black to black and white to white, the light is powered directly from the breaker. In this configuration, when you flip the switch on
you create a short through the switch.
What you need to do is hook it up like this.
Notice the white wire that runs between the switch and the light has a black stripe on it (in above image), that lets anybody that works on this light in the future know that the wire is switched. You can mark the wire using a bit of electrical tape, or a marker.
Figuring out which wires come from the breaker, and which go to the switch will require some tools. First Turn off the breaker, and verify the power is off using a non-contact voltage tester. Now pick one set of wires to work with first (one black and one white from the same cable). Turn the switch to the on
position, and use a multimeter to check continuity between the two wires. If the wires are connected (low resistance), these are the switched wires. If not (infinite resistance), check the other set of wires. If neither pair pass the test, contact an electrician.
If at any time you don't feel comfortable doing this work, or you don't have the proper tools to complete the task. Contact a local licensed electrician.
It sounds wrong to me, but I couldn't be sure without actually being there. You should connect the new fixture, in exactly the same way the original fixture was connected.
If there wasn't a grounding conductor in the original circuit, replacing the fixture did not make one magically appear. If a grounding conductor is required, you'll have to install one in accordance with local codes.
Best Answer
Usually red is switched, black is hot, white is neutral. However, you should verify this with either a test light or a multimeter ($5).
So the easy way to do this is to connect white to white, red to black, and see what happens when you flip the switch.
However, red might be a second circuit or part of a three way switch -- there's no easy way to tell without testing it. Write down the voltages between white and ground, black and ground, and red and ground with all switches in both positions -- have your assistant operate the switches while you test them.
Finally, turn off the power at the breaker, connect white to the neutral, black to the hot or switched leg (your preference), turn the breaker on, and operate the switches to make sure everything is working.