An isolated thermodynamic system reaches equilibrium when the entropy of the system is maximum. For example, the flow of heat from a hot body to a cold one implies an increase in entropy. This increase takes place until the bodies reach the same temperature (thermal equilibrium). The process of dissolving a salt in water involves an increase in entropy, which ceases when all the salt has dissolved.
In an isolated system that is not in material equilibrium, spontaneous chemical reactions, or the transport of matter between phases are irreversible processes that increase entropy. These processes continue until the entropy reaches its maximum value.
The material equilibrium condition is the maximization of the entropy of the system plus that of the surroundings.
$\Delta S_{sis}+\Delta S_{in}$ maximum at equilibrium.
$\Delta S_{sis}$ is maximum at equilibrium for isolated systems.