The Mazda RX-8, like most cars, is equipped with a "Check Engine" light to alert you to malfunctions within the car's engine that may need addressing.
One of the most common reasons for the RX-8's Check Engine light to turn on is the gas cap not being on tightly enough. Turn off the car, make sure the gas cap is tight, and check to see if the light is still on. You may need to drive the RX-8 for several miles after tightening the gas cap before the light turns off.
If the Check Engine light is flashing in your RX-8, it means the engine has misfired and to keep driving could damage the catalytic converter. Take your car to an automotive repair shop to get this resolved as soon as possible.
The Check Engine light in your RX-8 may come on to alert you to the fact that you need an oil change.
The Check Engine light in your RX-8 can come on to alert you to any number of malfunctions dealing with the car's engine. If you can't diagnose on your own why the light is on, it is best--for your safety and for the upkeep of your car--to take the RX-8 to an automotive repair shop and have a professional find out what the problem is.