For a brand new tank, you should "cycle" the water in order to allow good bacteria and a natural formation of nitrates and nitrites to occur. This process should take only a few days and I highly recommend having your tank totally set up and running when you introduce the first fish to it.
A good way to test your water conditions is by purchasing test strips. I prefer Mardel brand 6-in-1 strips. They test every aspect of the water quality from Ph to hardness etc. You will also need some water conditioner and possibly a hardener (depending on the local water quality). That sounds confusing, I'm sure, but any reputable fish dealer should be able to help you with the basics.
Goldfish are my personal favorite fish and I have raised plenty of them. They are a bit different than many other types in that they release more ammonia into the tank system. They are messy eaters and produce more waste than most other fish. If you are seriously considering goldfish, I would also think about a bottom feeder fish (Corydoras, the little gray catfish, are great and live forever)
Whew, this is long...
Oh! And a 1o gallon tank is not too small for a normal common or comet goldfish. You can keep several in a 1o gallon just fine. The fish tend to grow to the size of their container so a fish in a pond will get much larger than one in a small tank...
Almost finished...
Goldfish can be bought at a pet store without worry. They are typically used as "feeder" fish (so sad!) for carnivorous fish so they are cheap. They make very sweet little pets, however, and can live for several years. If you feel unsure about the fish netted for you at the store, speak up. By buying a fish with any sort of problem, fungus, or odd mannerisms, you are supporting the stores neglect of the animal - a big no no.
Anyway, If you have ANY fish related questions, just give me an email. I live for fish and want to help other fishkeepers with this amazing hobby!