Gerry, my Smoke/CO detector goes off when I cook, but warns me of "Fire! Fire!" (It has a voice warning telling you which the problem is.) I find it goes off anytime I cook unless I open the fantastic fan vent over the table (fan off, most of the time) and the window over the stove. Occasionally I'll turn the fan on as well.
If your CO detector goes off -- not your smoke detector -- you might look at the color of your stove-top flames. When there is no pot on top of them they should be all blue or white, no yellow, amber, orange, or red color at all. If you see these non-blue colors, you are creating CO gas and need to clean and/or adjust the air intakes on your burners.