Check engine light. on 2006 Nissan Xterra

Check engine light come on and stays on a long time and then turns off for a long time.

Asked by for the 2006 Nissan Xterra
Something in the engine control system has malfunctioned, and the light is illuminating to warn you. A diagnostic test must be performed. A diagnostic trouble code (DTC) or codes will be stored in the engine processor's memory, allowing you to have some clues to find out what is going wrong. Seek technical assistance soon, as some causes of a check engine light are potentially damaging to further vehicle components.

Good luck,