Druid Query Execution [Theoretical]

I would like to know how a druid query executes based on the query type. For example, I would like to know what broker,middlemanager,historical nodes do for querying. I also would like to know what resources are being used for what operation. I tried going through the Druid white paper and Druid docs and I could not find a good document that explains this. Can someone help me on this? (PS: I am very new to Druid)