The only RENFE counter at the airport is in Terminal 1. There is no train ticket office at Terminal 4. The connection between both terminals is done by bus shuttles. The trip takes about ten minutes. It is up to you to do the moving, but consider that you will be carrying your luggage. If your hotel downtown is not far from either Chamartin or Atocha, then it could be easier to wait until you are there.