'96 Ranger check engine light on

My '96 Ranger is either missing or having some other sort of electrical shorting. When driving over 30mph it will sporadically sound like the engine has turned off and will lose speed for a few
seconds. Then it will "turn back on" for a few moments and be ok until it happens again. When I come to a stop it dies. I start it up and get going and it will drive the same way I described. Now the check engine light has come on.
What's the most common reason for the check engine light to come on?
What sort of information would I get from running computer diagnostic check to the on-board diagnostics (OBD-II port)? Is something like CarMd worth getting or is there something better (cheaper)?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
snipped-for-privacy@yahoo.com wrote:

A problem detected by the computer.

You will get a trouble code like P1023 and information that tells you what things may be the problem.
You can take the truck to Autozone and some other stores and have the codes read for free.
Jeff
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Thanks for the Autozone tip!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.