The Cabibbo-Kobayashi-Maskawa matrix is a key element to describe flavour dynamics in the Standard Model. With only four parameters, this matrix is able to describe a large range of phenomena in the quark sector, such as CP violation and rare decays. It can thus be constrained by many different processes, which have to be measured experimentally with a high accuracy and computed with a good theoretical control. With the advent of the B factories and the LHCb experiment taking data, the precision has significantly improved recently. The most relevant experimental constraints and theoretical inputs are reviewed and fits to the CKM matrix are presented for the Standard Model and for some topical model-independent studies of New Physics.