It was not the dot-com bubble, though that situation created the general overpricing of most stocks. The drop in Apple happened before a lot of the carnage from the dot-com collapse. Apple like many high flying stocks was priced for perfection. As long as they kept beating numbers, it was fine, but if they missed...
It was primarily Apple announcing that is would miss earnings estimates. By a lot. For all of 2001.
The iMac was aging and sales were slowing. Remember, this was still the original iMac, with the G3, and had been on the market for 3 years (how many computer models stay on the market for 3 years?). Also, education sales were a mess. They decided to reorg the division at back-to-school time...genius. At the time, Apple still had 30-40% of the education market. From that point forward, Apple's share has dropped to about 10%.
But mostly, it was because of the complete failure of the G4 Cube.