it means treat others as you wish to be treated. that is the main rule of the Torah according to Shabbat. everything else just further states that one rule and adds onto it
He is saying to not judge a person before knowing them properly. To understand the perpectives of people that face things like discrimination and not to have bad opinions on them.