There are not that many firms that produce this type of equipment. The most popular one is shimano, with smaller competitors like SRAM and Campagnolo. SRAM gear is fully compatible with the Shimano one. Camagnolo has its own and is incompatible with Shimano or sram one. Almost all bikes have shimano gear, so I'd suppose you have the shimano stuff.
You need to know how many gears your cogset has and is irrelevant, how many "teeth" the cogset has.
shimano/sram has different quality lines and differnt sizes. What you need to know is basically, how many gears you had before. These systems vary between (1) up to 8 gears, (2) 9 gears, (3) 10 gears ( and (4) 11 gears?). Shimano and other manufacturers tried to pack up more gears as years went, therefore they had to pack more cogwheels in the same amount of space, therefore all these systems have exactly the same width, and therefore they are completely incompatible between each other, i.e., 8 gear thingy will not work with 9 gear cogset and vice versa.
Once you know the number of gears (in your case it is nine), you'll have to choose the quality line. This varies from Acera (cheapes) to XTR (most expensive). Up to XT line, you'll get both the weight and the stability increase. Above XT shimano and the others are trading weight for stability.
If you let me know the price of the bike, I'd give you a suggestion for the gear :)