If Javascript is single-threaded, how can ‘await’ wait ?

How await works under the hood and why Javascript isn’t actually waiting