if it's definitely inside under the dash, it's probably a blend door actuator sticking or has stripped its gear. The fresh air door usually closes itself some time soon after turning the car off. (and all the hvac doors reset to the last setting at startup).
If it's under the hood, it's probably an emissions purge valve which is normal.