IF the motor is working, then your pretty stoked.
What you want to do is unbolt the top secureing "castle" nut and try to pull the motor out from underneath the fender.
I would probably just plan on buying a new mast from Toyota...i got one for under $50...Or, you can simply just change it over to a regular whip antenna.
But, the main thing is to take apart the motor and see if there is any broken plastic peices. The antenna is obviously metal outside, but the inside is a toothed plastic piece which is used by the motor to push up and down the mast.
A lot of the times, the plastic gets old and eventually breaks off in the motor.
I was lucky and got the plastic out easily. Then, I just put the motor back where it was supposed to go and put in a new antenna. You'll want to have a friend help you putting the antenna back in. Makes things A LOT easier. One holds the antenna and feeds it into the motor and the other turns the radio off.
If you go to the dealership they will just tell you how to fix it as well....er, well mine told me cause I had no clue what to do at first.