If there was ONLY a black and white wire (and ground) I doubt it was a 3-way switch. The quicker way would have been to turn off the switch BEFORE you started working. But if there was a red wire or "traveler" then you still may have been working hot.
But the best way to go would have been to turn off the breaker. Problem is, contractors often do not label the breakers with a lot of detail.
Odds are the place where you bought the light fixture (HD or Lowe's) also had:
1) a circuit tester
2) a homeowner's guide on electrical wiring
Also - the instructions that came with the light probably had a enough information to keep you from doing this.
You are not dumb, you just did not think. Perhaps you are not cut out to do any time of home repair. But if you stop and think a little and take the time to educate yourself you could have done this right.
As far as what to do:
1. Read the instructions that came with the fixtures
2. Keep the 2 wires away from each other and still assume they are hot.
3. Go to the electrical section or HD and get yourself a circuit tester.
4. THEN use it to check to see if the wires are hot (the black wire is the hot wire, white is neutral)
5. Even if you think they are not hot (ie the little light on the tester does not blink) take the tester and verify that it works by checking an appliance cord or an outlet in another room that you did not disable.
6. Check again with tester to see that the wires you effed up are not hot. Check the white wire too, some bone head may have reversed them.
7. Check breaker box or fuse box. If a fuse box and if you blew a fuse you should see a fuse with blackened glass and no silver bar going across. DON'T replace it YET.
8. If breakers, one of the breakers will be just a little away from the on position but not all the way to off. Once you find this breaker, flip it all the way to off.
8. Now go back and check the wires you effed up Not hot? BRAVO, the power is dead.
9. reread the instructions.
10. check again to see the wires are dead with your tester.
11. DEAD? BRAVO!! Now be sure the light switch is off. Cut back the burned or melted copper to clean copper, strip per instructions, install fixture per instructions.
12. go back to breaker box, turn on breaker.
13. turn on switch - LET THERE BE LIGHT!!