Get a bus (144 I think) from Heathrow Central Bus station to Feltham. They run every few minutes
At Feltham get a Reading train to Ascot (every 15 minutes) where you change for a train to Aldershot (every half hour). At peak times there's the odd through train I believe.
It will take an hour and a half or a little more from Heathrow
To get to the bus station from terminals 1 2 3 just follow the signs.
From T4 get the Heathrow Express (free on this section) to T123 first.
At the airport, follow the signs to Heathrow Central Bus Station. Go to Stand 19. Take the Woking RailAir coach (Service 701) to Woking rail station. The coach service runs every 30 minutes (at 15 and 45 minutes past the hour), with a journey time of 50 minutes.
At Woking rail station, ask staff to direct you to the first train for Aldershot. Typically, the train will leave about 25 minutes after the coach arrives, with a journey time of just 19 minutes.