In particle physics, the baryon number is an approximate conserved quantum number. The baryon number of a system can be defined as one third of the number of quarks minus the number of antiquarks in the system.
Why one third? According to the laws of strong interaction there cannot be any bare color charge, i.e. the total color charge of a particle has to be zero ('white'), cf. confinement. This can only be achieved by either putting together a quark of one color with an antiquark of the corresponding anti-color, giving a meson with baryon number 0, by combining three quarks into a baryon with baryon number +1, or by combining three antiquarks into an anti-baryon with baryon number −1. Another possibility is the exotic pentaquark, consisting of 4 quarks and 1 anti-quark.
Thus, quarks are always present in threes, if antiquarks are counted as "negative quarks", and one might as well divide the number by three. Historically, baryon number was defined before the existence of quarks was established. Nowadays it might be more accurate to speak of the conservation of quark number.
The baryon number is nearly conserved in all interactions of the Standard Model. The loophole is the chiral anomaly. However, instantons are not all that common. 'Conserved' means that the sum of the baryon number of all incoming particles is the same as the sum of the baryon numbers of all particles resulting from the reaction.
The still hypothetical idea of grand unified theory allows for the changing of a baryon into a bunch of leptons, thus violating the conservation of baryon and lepton number. Proton decay would be an example of such a process taking place.