An easy way to understand how a chiller works would be to think about it in terms of the human body. If your HVAC unit is the body, then the chiller would be the lungs. In short, your heart pumps deoxygenated blood to your lungs where gas exchange can occur. During this exchange, carbon dioxide is replaced with oxygen. The newly oxygenated blood will then flow through the rest of your body providing oxygen where needed. A chiller works in a similar way.
In this scenario, replace blood with liquid, carbon dioxide with heat, and oxygen with cold. A machine pumps the warm water or fluid to the chiller. The chiller then cools the refrigerant through heat exchange. The newly chilled refrigerant is then sent out to restart the cooling cycle.