What is meant by the statement that Article 14 of the Indian Constitution permits classification but prohibits class legislation?

The equal protection of laws under Article 14 of the Constitution does not mean that identically the same laws should apply to all persons, or that every law must have a universal application within the country irrespective of differences of circumstances. This is because all persons are not, by nature attainment or circumstances in the same position. The varying needs of different classes of persons often require separate treatment. In fact, identical treatment in unequal circumstances would amount to inequality. So a reasonable classification is necessary if a society has to progress.