Grainy photos are usually caused by using a higher ISO setting. In digital cameras, this is referred to as "noise".
Trying to photograph action in a gym is difficult for any camera. There just isn't enough light. If you are shooting at 12X, flash will have no effect and should be turned off.
I would try setting the ISO to 200 and going to shutter priority mode. Then set the shutter speed to about 1/100th of a second. When you hold the shutter button half way down, some cameras will tell you if their is enough light to get a good exposure.
Regardless, take the photo and check the results.
If the photo is too dark you have two choices; raise the ISO setting or slow down the shutter speed.
If the photo had good exposure, you have too choices; raise the shutter speed to better prevent a moving subject from blurring or lower the ISO setting to reduce noise.
You can also try removing the noise with software.
and download the free Noiseware Community Edition.
Run the program using the default settings and load your noisy photo.
It should improve the photo.
I'm kinda new to this. I had a basic point & shoot camera and got decent results. I went one step up to this camera a few days ago so I could photo my daughter durung gymnastics competitions but the pics are real grainy. I've been reading but I cant seem to get a perfect mixture of ISO, fstop amd speed to get pics that are as clear as the cheap camera. The camera has a lot of manual settings that I am just starting to understand. Im wondering what I need to set everything up as to get a good motion shot, indoors at 12x optical zoom? Thanks a lot for any help.