I have studied this in almost every physiology book but I just can't understand how carbon monoxide can affect oxygen's affinity to Hemoglobin. I know that there is left shift in oxygen dissociation curve but why?
Affinity for any ligand to a protein is a function of the shape of the protein which provides some place for the ligand to bind/interact.
Hemoglobin typically exists in tetrameric form: it is a collection of 4 subunits that each bind 1 molecule of oxygen.
The shape of hemoglobin is affected by CO2/pH, which is important for having high affinity for oxygen in the lungs and lower affinity for oxygen in tissues where a lot of CO2 is released (i.e., where there is a high rate of metabolism).
The shape is also affected by binding oxygen itself: binding oxygen to one subunit causes conformational change in the other subunits of the tetramer, increasing their affinity for oxygen. This is called "cooperative binding."
So, how does any of this relate to CO? Well, it turns out that not only does CO bind very tightly to hemoglobin in the place oxygen would normally bind, taking up space and reducing the capacity for oxygen, it also very strongly increases the affinity of the other subunits for oxygen. It increases the affinity enough that even in the low-oxygen high-CO2 environment of the capillaries, carboxyhemoglobin (hemoglobin bound to CO) continues to hang on to rather than release oxygen. This is represented by a shift in the dissociation curve to the left: oxygen stays bound even when the concentration is low.
This means that fewer CO molecules are necessary to cause deficits in oxygen transport than would be needed if it was only taking up space: one CO molecule binding to a hemoglobin tetramer effectively prevents transport of up to 4 molecules of oxygen.
As a quick caveat, I believe some of the biophysics here are still incompletely understood, so please consider this answer to be an approximation and an explanation of experimental findings to a level of precision sufficient to understand the pathophysiology of CO poisoning. More depth is necessary for a biophysical approach.
Roughton, F. J. W., & Darling, R. C. (1944). The effect of carbon monoxide on the oxyhemoglobin dissociation curve. American Journal of Physiology-Legacy Content, 141(1), 17-31.
Eaton, W. A., Henry, E. R., Hofrichter, J., & Mozzarelli, A. (1999). Is cooperative oxygen binding by hemoglobin really understood?. Nature Structural & Molecular Biology, 6(4), 351.
It doesn’t. Carbon monoxide has a higher affinity to hemoglobin (as in, binds better to the protein), that’s why it prevents oxygen from binding to hemoglobin.