This has been asked a few times before:
like here with an answer by /u/Eireika
and another one with a nested comment by /u/Valkine adding the the scene was probably a creative freedom, mixing a historical known ice gift from Saladin elsewhere into the movies setting.
tl;dr: ice could be harvested and transported isolated with hay and sawdust and stored in specialized buildings and pits but conditions of practicality and cost apply.