Hi, you are correct in the assumption that the Chat server handles the routing of chat requests. It does this in a round robin fashion to the agents that have joined that queue.
The Skills come into play when you create the queue in the chat server configuration on PRPC. When you assign skills to a queue, PRPC automatically determines which agents are eligible to join that queue. When an agent logs in to the Chat server and goes to join a queue, only the queues that the agent is eligible to join are presented.
As far as real time queue determination, you only have one option OOTB. You can use the URL mapping feature to automatically select the queue based on the URL of the page where it's launched from.