Well, either the book left out an important aspect of quarks or you read too fast. The weirdest things about quarks is that their charges are not "unit" charge + or - (like a proton or an electron) but +2/3 and -1/3 respectively for up and ddown quarks. (I think I have that right.) Anyway, this explains how two up plus 1 down can have charge +1 while two down plus 1 up can have zero charge. (The proton & neutron respectively.) You might well ask, wouldn't particles with such weird charges be easy to detect? Probably they would, if you could ever "see" a single bare quark. But you can't, because the force between quarks gets BIGGER as they get further apart (almost like a spring -- but not quite) so by the time one quark starts to get off by itself, the vacuum between it and its compatriots is torn apart, releasing quark-antiquark pairs that even things up again. You might ask, then, are quarks really real? Good question. For decades people considered them to be just a cartoon version of a mathematical symmetry obeyed by the strong interaction; but it turned out to be such a GOOD cartoon (all aspects of the theory seem to be embodied in this picture) that the argument boils down to a quibble over what you mean by "real". Crazy stuff, eh?