You're upgrading your phone's OS to a rooted OS. It was a comparison that you'd understand.
You don't know what you're talking about.
When you root you don't change your OS, rooting is simply giving your phone access to files that were previously read-only. That's it.
Furthermore, I believe you're referring to
firmware not, "operating system." Android is the operating system; when you flash custom firmware you are changing
firmware versions. The operating system is going to be Android regardless of what ROM you use. An example of switching your OS would be somehow going from Android to iOS.
Do some research before you waltz into a thread acting like you're an expert on the subject.
Now to answer the question at hand
I'm going to assume 100% that you're on Gingerbread, which means one click rooting will not work since Google removed the rageagainstthecage and Zerg Rush exploits. You're going to have to flash a custom recovery (unless you're on a locked recovery like I was, in that case any guides you find will give you the extra steps) then flash root in your new custom recovery.
Flashing your custom recovery will be achieved through either Odin or Heimdall, both of which have one-click versions in most cases. Odin is a very good way to brick your phone (make it useless) so you
must use it with caution and follow the step-by-step instructions as carefully and precisely as possible. Samsung phones are pretty much unbrickable now with the existence of jigs but that's a whole other story, the point is don't give yourself the headache of unbricking.
There's a forum called XDA that I highly recommend you look up, they will have everything you need to get started if you choose to. Hope I helped.