To answer your first question, a camera detects infrared light the same way a basic camera would detect visible light.
Photosensors are exited when in contact with a photon, and the part of the electromagnetical spectrum which is detected by this camera will depend on the sensitivity of said sensor. So a basic camera will detect visible light because it has certain sensors (sensitive to visible light), while an infrared camera will detect infrared light because it has another type of sensors (sensitive to infrared light).
For your second question, the colors the camera shows have nothing to do with what you think it is! Don't forget that infrared light cannot be seen by the human eye, so the color displayed on your camera are only here to show the difference between to objects radiating differently depending on their temperature. For example a cold object will be seen purple or blue on your a camera, while a hot object will appear red or white (these are only conventions, inverting the set of color won't change anything about the radiations your object emits!).