You can use any of the rail methods to transfer between terminals - and it's free. Either tap in and out (it won't charge you) for the Underground or get the specific transit ticket for the Express or Elizabeth line. It works for all three Heathrow stations and Hatton Cross.