Intellectual property is always tricky, and I don't know how a science fair would work.
In general, you own your intellectual property unless someone else has a right to it. So, unless you sign a paper that specifically says that the sponsors of the science fair have ownership of the ideas presented there as a condition of your participation, then I think you would still own the rights.
However, if you publicly present your ideas (like at a science fair), and they are not yet patented/copyrighted, then the ideas are not protected, and you could lose ownership if someone else patents them - maybe even if they got the idea directly from you. I am not entirely sure, but if you present your ideas publicly without a patent on them, then you might also lose the ability to patent them in the future.
Somehow, it seems unlikely that a kid at a science fair will singlehandedly come up with a patentable and valuable idea, but if you think you have one, perhaps you should seek out and talk to a patent attorney.