What is the "TV Rating" system based upon?

Several times i have heard people talking about how a certain drama/show was the highest rated drama on tv, but i always wonder what are those rating based upon?
A lot of the times, the ratings doesn’t even match with what ppl think about that certain drama/show, for example every single person that i know on earth who have ever seen drama “yeh zindagi hai” hated it with passion after the first initial 20 episodes, but the makers of that drama always talked about how it was the highest rated drama. Same goes with the shows, nadia khan’s show was doing horrible, we were continuously discussing its flaws here and nadia khan was raving about her show’s high rating. etc.
I don’t think audiance gets to do any sort of voting, or the tv channels has any way to knowing how many people are watching their dramas while its on tv, then who is out their giving them those rating? are they even authentic, or just like everything else these days, based on how much money is been given to the person/department who is responsible of giving the ratings?
Who give them these rating, what are their criteria.
i don’t think anyone of us would know the detail, my question is to all those media related ppl who often comes here, and participate in our discussion.

Re: What is the "TV Rating" system based upon?

hmm commercial success...like the revenue earned from the advertisements i guess?