SweatWorks Interview Question

How the event loop works?