What is the meaning of the saying "It's not what you know but who you know?"
This idiomatic saying is generally interpreted to mean that it doesn't really matter how intelligent a person is or how well suited they may be to a role because of past experience or qualifications; if there is somebody else who is better connected to a person in a position of power, that better-connected individual is likely to be privileged over the better-qualified first person. Effectively, this statement refers to cases of nepotism—where somebody is offered a job over a more qualified second person because they may be related to a hiring manager or the boss of the company, for example. It is also often used when discussing the practice by which members of certain organizations, such as the Masons, are able to get ahead in life because they belong to an inner circle.
Sometimes, we can use this tendency for our own benefit—it is never a bad idea to network with others and ensure we are a well-known name or face. Provided we do have the necessary skills and qualifications, it is not immoral to help ourselves get ahead by making connections. However, this phrase does generally suggest a condemnation of both the person getting ahead above others and the person in power who is allowing this to happen.
The meaning of this saying is that people get ahead in life based on their connections, not on their skills or their knowledge. It is saying that often people advance based on nepotism or on friendship, not on whether they actually know what they are doing in their job.
There are many examples of this, especially in countries where corruption is common. For example, it is said that Muammar Gadhafi's children are all rich and have important jobs simply because they are his children, not because of anything that they actually know. On a much smaller scale, you have probably seen this in your own neighborhood. High school students often get summer jobs, for example, based on who they or their parents know, not based on whether they would be a really good worker or whether they have a given set of skills.
So, the meaning of your saying is simply that people get ahead in life based on their connections (who they know) not based on their skills (what they know).