When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
o2 sensors or cats most likely.. what is the code? take to auto zone they will read it for free and can clear it...if not, disconnect the bat(pos and neg) turn the key ON and step on the brake for 20 secs...reconnect the bat, then expect it run funny till the pcm relearns....best way to treach it is run it in parka/c off then on for like 60 seconds,. then do the same thing in reverse...
If you do go get the system scanned at Autozone like Rick suggested please get the code number and not just the description of it. It will be a P**** code. It makes it a lot easier for us here to figure out what the problem might be. There are numerous sensors and outputs that can cause the light to come on.
What year is your truck? How many miles on it? What size engine?
That should be pretty easy to fix
Hopefully it's just a spark plug or wire.
Could be a vacuum leak or some other mechanical problem but try the basics first.