In this study, we describe quark confinement in terms of linear interaction potentials and solve the problem of the net spin of a proton. The three quarks in a proton are assumed to revolve around a common center, and their masses are determined assuming they are Dirac particles. On the basis of these assumptions, the magnetic moment of a proton can be derived. Moreover, the rotation of the quarks is considered, in which an electrical current induces a magnetic field. Thus, the scalar product of the magnetic moment and field describes the linear interaction potential between the quarks, and the mass of the proton can be obtained. The proton mass predicted by this physical model is consistent with experimental values, and no numerical or fitting calculations are required. Furthermore, using the newly derived spins and angular momentum of the three quarks, we derived the net spin of a proton. Additionally, we predicted the mass of a pi-meson from the same model, which agrees with the experimental values.