If there is little or no warning, there is no chance of survival. However, with some preparation, it is feasible to survive deep underground - a few km would do.
The interior of the Earth is quite warm, to the extent that for every km you go underground, the temperature rises 25–30 °C (the geothermal gradient). Earth's internal heat comes from a combination of residual heat from planetary accretion, heat produced through radioactive decay, and latent heat from core crystallization. The sun only heats the top few metres of the Earth's surface. Hence, keeping warm is not a problem. There is also plenty of water underground in aquifers, which can go as deep as 9 km or more. Air can be recycled, but it will still be present on the surface as frozen air, which can be mined.
For energy, geothermal energy is an obvious solution. Nuclear power could also serve, though storing the nuclear waste might be a problem. Ejecting it to the surface is no good if you want to live there after only 1,000 years.
With heat and energy, you can grow crops under artificial lighting and even keep a few animals like dairy cattle, chickens, and perhaps sheep for wool, milk, and meat.
Some places may be more suitable than others, like Iceland, which has many hot springs that provide ready heat and energy near the surface. You would only need to dig down far enough to have protection from meteorites once Earth's atmosphere freezes.
The greatest challenges for survival for a thousand years will be to maintan the knowledge to maintain the machinery that keeps underground cities running and to preserve biodiversity and genetic diversity. The latter could feasibly be managed by storing seeds and fertilized eggs in permafrost near the surface.