Car shuts off when I come to a stop. on 2002 Ford Explorer

It starts right back up, but why does it just shut off when I stop?

1 answer
Check for codes,also check IAC, throttle bore to see if it needs to be cleaned.
Also check for vacuum leak.