Both.
Though they are more often found in cool water rather than very cold [e.g. South Africa and Australian south coasts and often around seal colonies, where they mate and pup.
They are however avid travellers and are not uncommon in warm waters, even equatorial seas [but usually deeper there].
I have personally seen a few in sub-tropical waters and very large ones have been caught off Kenya.
Chat with our AI personalities
It depends very much on the species.
The greenland shark (Somniosus microcephalus), the pacific sleeper shark (Somniosus pacificus) and other sharks live in arctic and subarctc cold waters.
The southern sleeper shark (Somniosus antarcticus) lives in antarctic and subantarctic waters, specially in the Southern ocean.
These are only three examples of cold water shark species.
Other sharks only tolerate warm waters, like the whale shark (Rhincodon typus,), the tiger shark (Galeocerdo cuvier) and the great hammerhead shark (Sphyrna mokarran); this last species can live in warm AND temperate oceanic waters.
The great white (Carcharodon carcharias) prefer warm to temperate waters but, beeing an warm blooded shark species, it can also tolerate cold waters.
Great whites have been seen and captured in very cold waters, like the Drake Passage, south of Cape Horn, as well as in the Bering sea, near the coast of Alaska, preying on seals (but not in the Gulf of Alaska).
hammerhead sharks mostly prefer warm water so i would say about 69 degrees to 82 degrees in between really.