__c is used to denote the custom fields and custom objects in salesforce org, whereas __r is used to refer the parent object fields in their child object.
Example: Suppose there is a object named as Student__c(custom object) in org and it is having lookup relationship with School__c(custom object) and lookup field api name is School__c as well. School object has Name, Rating etc. fields.
Then to refer the Rating field in child object record i.e. Student__c, we use School__r.Rating.
__c is used to denote the custom fields and custom objects in salesforce org, whereas __r is used to refer the parent object fields in their child object.
Example:
Suppose there is a object named as Student__c(custom object) in org and it is having lookup relationship with School__c(custom object) and lookup field api name is School__c as well. School object has Name, Rating etc. fields.
Then to refer the Rating field in child object record i.e. Student__c, we use School__r.Rating.