The masses of quarks, like other elementary particles, are properties that are determined by the Higgs mechanism in the framework of the Standard Model of particle physics. According to this mechanism, particles acquire mass through interactions with the Higgs field.
In the Standard Model, the Higgs field permeates all of space, and particles interact with it to varying degrees. The strength of this interaction determines the mass of the particle. Particles that interact more strongly with the Higgs field acquire a larger mass, while those that interact less strongly have a smaller mass.
In the case of quarks, the masses are not determined solely by the Higgs mechanism. The up (u) and down (d) quarks, which are the lightest quarks, have relatively small masses compared to the other quarks. The specific values of quark masses are not yet fully understood and are considered as fundamental parameters of the Standard Model.
Regarding the mass difference between the up and down quarks, it is not well explained by the Standard Model alone. The Standard Model does not provide an underlying principle that directly determines the relative masses of the quarks. The mass differences between quarks are believed to arise from a combination of factors, including their interactions with the Higgs field and the dynamics of quantum chromodynamics (QCD), the theory of the strong interaction.
QCD, which governs the interactions between quarks and gluons, is a complex and non-perturbative theory. It involves phenomena such as quark confinement and the formation of hadrons (particles composed of quarks) that make the determination of precise quark masses challenging. The masses of quarks are considered to be emergent properties resulting from the strong interactions within QCD, and understanding their specific values is an active area of research in particle physics.