Since all people are unequal (they are all different and have different capabilities) how can we say they are equal under the law?
When we say that people are equal before the law, we are saying that they have the right to have the same opportunities and the same rights as anyone else. We are not saying that they are literally equal, just that they are equal in legal terms.
For example, I am male and you are female. You look to be Caucasian and I am of mixed race. I'm much older than you appear to be. So, we are definitely not equal in many ways. However, we have the same rights before the law. The police cannot legally detain me unless they would, in the same circumstances, detain you. They can't legally treat me differently because I'm a person of color and you are not. If you and I are equally qualified for a job, an employer cannot pick me because I'm male and reject you because you're female. We are unequal in the sense that we are not physically identical, but we are equal in that we have the same rights before the law.
When we say that we are equal before the law, we are simply saying that the law has to treat us the same. We are not claiming that you and I (or any two people) are equal or identical in all ways. We are just saying that we have the same legal rights.