In order to understand the operation of switching and routing of RouterOS, we need to understand the packet traffic flow mechanism thoroughly [1]. Please take a look at the folloiwng diagrams
After having read the above diagrams, you can browse the link [2] to get more knowledge how those diagrams work.