CodeClouds interview question

How Javascript Event loop works?