Explain how the browser event loop works and how it handles asynchronous operations like microtasks and macrotasks.