Autozone and places like that can run a diagnostic on your car and produce a code. Sometimes they can tell you what the code means and sometimes they can give it to you for you to look up online.
I've had the gas cap reading, and also a cylinder misfire. The cylinder misfire was because my spark plug wire was touching my steering column. I ended up getting a shorter wire and it solved it immediately.