Inside the flask there is a region of vacuum, around the space we put tea in. In vacuum heat is transmitted through only radiation, because there is no matter to carry heat across. The amount of radiation is further reduced by silver coating, which reflects radiation energy.
As the transmission or transfer of heat from inside the flask is blocked, tea is in a thermally insulated region or isolated region. So the heat energy in the Tea is retained over a long duration.
But still, due to small and gradual losses of heat over long duration, tea can become cold.