Agree with 10wheels. When you installed the tube, you pinched the tube between the tire bead and the rim. What you described is exactly what happens when you do this. You pump up the tire and, either while pumping or a few minutes later, there is a loud "bang", and when you look you have a rip in your tube.
Nearly all of us have done this at least once.