Why when I rev my car in drive, it doesn't accelerate?

Honda Accord 2008 sedan LX 2.4L 199k miles automatic transmission. I was accelerating pretty fast and I was reaching 4000 rpm when my car made a huge sound and shaked, I thought I hit something, then my engine made a huge sound when I put it in park so I turned off the car. I turned it back on, it started, when I put it in drive it made a loud sound for half a second, again I pressed the gas and it reved but didn't move, but the speedometer was going to 40-50mph but the car wasn't moving. I put it in park and it makes a huge loud continuous sound, so I turned off the car. I put it in neutral to roll it. Then I put it in park and the car still rolls! I had it towed to a transmission shop but I want to know what it could be now! I'm in highschool currently a senior and I can't concentrate right now because I need to know what is wrong with my car!

Honda Accord 2008 sedan LX 2.4L 199k miles automatic transmission. I was accelerating pretty fast and I was reaching 4000 rpm when my car made a huge sound and shaked, I thought I hit something, then my engine made a huge sound when I put it in park so I turned off the car. I turned it back on, it started, when I put it in drive it made a loud sound for half a second, again I pressed the gas and it reved but didn't move, but the speedometer was going to 40-50mph but the car wasn't moving. I put it in park and it makes a huge loud continuous sound, so I turned off the car. I put it in neutral to roll it. Then I put it in park and the car still rolls! I had it towed to a transmission shop but I want to know what it could be now! I'm in highschool currently a senior and I can't concentrate right now because I need to know what is wrong with my car! Please help! You may be lucky and it's just a broken CV joint instead of a bad transmission. When CV joint breaks completely the axle will spin in the broken CV joint. Because the speedometer is going up with out the vehicle moving that would verify my guess. When the transmission goes out the speedometer doesn't move, just the rpm's go up with the vehicle not moving. If you want to check this yourself have a friend start the motor and while steeping on the brake pedal put the transmission in gear. Then you need to crawl under the vehicle to look at the drive axles to see if they are moving. One of them should be if I'm right. The one that is moving is spinning in the CV joint and the complete axle just needs to be replaced. Figure 2.5 hours of labor and ales are somewhere between $100 and $200. Make sure to tell the tranny shop a mechanic told you it's likely the broken axle. They like to sell rebuilt transmissions to everyone that comes through the door. The transmission has failed. Major repair or replacement will be needed. Broken transmission or axel(s). Lol

The transmission has failed. Major repair or replacement will be needed.

Broken transmission or axel(s).