Sorry, I threw that last bit in there just to show that there MAY still be local traffic that has to go to the router, but realize it might have been a bit confusing now.
So, assuming that PC-A and PC-B are both connected to the switch, and the switch is connected to the router...
When you turn on either PC, one of the startup tasks the PC does is request an IP address from the DHCP server (router). This traffic obviously has to go to the router, since the router is the device handling the request. After both devices are assigned IP addresses, however, traffic is handled directly by the switch, unless it needs to be routed outside your network.
To answer your question, to simply transfer data between two devices, the router does not necessarily get involved.
A fairly simple example, PC-A wraps up some data in a packet and sends it off through the NIC. The switch gets the packet and looks at the MAC address of the destination device. The switch has an internal database of all the MAC addresses of devices currently connected to it, so it knows whether the destination device is local (on the switch) or not. If the destination device is attached to a port on the switch, it is sent directly to that port and on to the destination device.
If the destination device is not located locally on the switch, it knows that it has to pass the packet on to the router, so that it can be routed outside the network.
This gets way more complicated if you really want to go in depth, but for a home user this is all you really need to know.
For your typical home setup of Internet > Router > Switch > Various devices, you can assume that all substantial traffic between the devices in your home are handled directly by the switch (that is, file transfers, print jobs, etc.) and anything going out to or coming in from the Internet needs to go through the router. Since most home Internet plans are way less that the 100 Mbit/s speeds that the ports on your router probably provide, this is not an issue.