What is the meaning of [People who live in glass houses shouldn’t throw stones at others]

People who have faults should not criticize other people for having the same faults.

Example: The main political party in the opposition has blamed the ruling party for giving tickets to people with dubious background in the upcoming elections. But the big question is: are they themselves clean on this count? People who live in glass houses shouldn’t throw stones at others.