How the rating works?

Can someone tell me exactly how the rating system of codechef works?? Is wrong submissions also contribute to negative rating??