How did the three quarks ($u, d, s$) acquire different masses? If the three quarks $u, d, s$ had the same mass, they would have an $SU(3)$ flavor symmetry ($u, d, s$). This symmetry is broken because these three quarks have acquired different masses through interactions with the Higgs field (Yukawa interactions). However, in the Standard Model, Yukawa interactions are between the Higgs field and the doublet ($u, d$). What about the triplet ($u, d, s$)? How does this triplet interact with the Higgs field so that these quarks acquire their different masses? 
 A: In the SM, all six quarks, d,u,s,c,b,t, (and leptons) get their varied masses through gauge-invariant Yukawa interactions; their strong or generation symmetries are completely irrelevant, and the size or systematics or such masses is not part of the SM to explain. They are six arbitrary parameters (Yukawa couplings) completely unconstrained by SM symmetries; but, of course, beyond the SM model-building seeks to predict them, somehow. 
Typically, e.g., the weak-gauge-invariant couplings responsible for the mass of the d are
$$
-y_d \overline{   \begin{pmatrix} u_{L}  \\  d_L \end{pmatrix} } \cdot \Phi ~  ~d_R +\hbox{h.c.},
$$
where the v.e.v. of the Higgs amounts to 
$$
\langle   \Phi \rangle =  \frac{v}{\sqrt{2}}  \begin{pmatrix}  0 \\  1 \end{pmatrix},$$
 for  v ~ 0.25 TeV . You then see $m_d=y_d v/\sqrt{2}$.
The mass of the u in the weak doublet knows nothing about that coupling, and arises out of a completely independent Yukawa,
$$
-y_u \overline{   \begin{pmatrix} u_{L}  \\  d_L \end{pmatrix} } \cdot \tilde{\Phi} ~  ~u_R +\hbox{h.c.},
$$
where, of course, 
$$
\langle  \tilde{\Phi} \rangle =\langle i\tau_2 \Phi^*  \rangle =  \frac{v}{\sqrt{2}}  \begin{pmatrix}  1 \\  0 \end{pmatrix}.
$$
You write two such terms of each kind for the other four quarks, and you are done. 
The sizes of the Yukawas, and so the masses are experimental inputs: the structure of the SM accommodates them all, and gives model-builders something to do in inferring them out as something beyond the SM. Thus, there never could be an issue of them acquiring different masses: 


*

*There never was a good reason for any quark masses, or any fermion masses, to not be as different as they please. Expectations of the contrary in the SM rises to the level of metaphysical falsehood.


Corrections of these masses due to electromagnetism or chiral symmetry breaking effects of QCD  are implicit in the SM basic interactions, but messier to estimate. 


*

*small practical complication in "real life": Actually, for the 3 generations of the real world, there are more yukawas, cross generational, yielding more elaborate, non-diagonal mass matrices. Diagonalization of such ends up producing the CKM mixing matrix.

