What is the meaning of it takes the whole village to raise a child?

It means the entire local community is involved in the education and growth of children - they learn from what they see outside their home environment.