Yes, that all gets tracked. When you access a web page, you create an open session with time stamps. If you click away from that page, open a new page in the same window/tab or close your tab/window/browser, the time stamps are updated and/or your session closes. So multiple open web sites will get counted. They don't differentiate which pages you have in focus and which you have in the background.
tracked by whom exactly?