There is a bus - the 77 - that runs every 30mins, costs £4.80 and takes about 40mins. It goes from the station in T5 so very easy.
However a cab is generally £15-18. Windsor 5 star have been very good with about a 20min lead time from call to arrival. Coming back either ask the driver to book a time/place for you or there is a cab rank opposite the Castle and Central railway station. Or get the bus which stops centrally.
Let me know if you want any exceedingly details instructions!
Do check out (and ideally reserve) lunch at the Two Brewers. And precook your castle ticket as the queue can long.