This is a popular piece of confusion, because of a terseness in notation. Basically, we are secretly talking about two quantum numbers here: The total magnitude of the electron spin, $S$, and the relative orientation of the electron spins, $M_S$.
As you correctly identify, for the $\alpha\beta + \beta\alpha$ configuration you get some quantum number that is $0$. This quantum number is, in fact, $M_S$; commonly interpreted as the orientation of the overall electron spin along the z-axis. Note, however, that $M_S$ for the negative linear combination is also $0$. So something else must be going on here - why do we call one of those a triplet and the other one a singlet state?
At this point, it makes sense to recall another case where you have already learned the difference between the total magnitude of an angular momentum, and its orientation in space; and that is atomic orbitals. For an s orbital, the angular momentum quantum number is $l=0$, and the magnetic quantum number $m_l$ is also $0$. For a p orbital, $l=1$, and $m_l$ can take values of $-1,0,+1$. In other terms, for a state with a given angular momentum quantum number $l$, we have $2l+1$ different ways to orient that momentum in space, which is described by the magnetic quantum number $m_l$.
Now, let's go back to our electron spins. First, it is important to realize that we are not talking about single electron quantum numbers any more, but instead the overall multi-electron system as a whole. For this, we add the magnetic quantum numbers $m_s$ of all electrons to arrive at the total quantum number $M_S$ (note the uppercase letters). Since each electron can have an individual $m_s$ of $+\frac{1}{2}$ or $-\frac{1}{2}$ (i.e., $\alpha$ or $\beta$ spin), we can have different "configurations" with different values of $M_S$.
In your two-electron system, the simplest case are the configurations with $M_S=+1$ ($\alpha\alpha$) and $-1$ ($\beta\beta$), and with our knowledge about the orientation of angular momenta above in hand, we see that these must belong to an overall $S=1$ state. But to such a state must also belong a $M_S=0$ configuration. Luckily, we have two of those at hand with out linear combinations, and since the $\alpha\beta+\beta\alpha$ one obeys the same exchange symmetry as the $\alpha\alpha$ and $\beta\beta$ configurations, we group the three of them together and thus have completed the $S=1$ triplet state.
We are left with the $\alpha\beta - \beta\alpha$ configuration. Its $M_S$ value is $0$, and there are no other configurations available to go along with it, so we have identified an $S=0$ singlet state.