Answer
Exception to octet
Work Step by Step
The principle of full octet is that most reactivity patterns are described well if there is a driving force / energetic gain for full octets in main-group atoms.
However, the only facet of an atom that dictates anything about the number of valence electrons is its nuclear charge. Boron has a charge of 5. This is balanced by 5 electrons. Two of them are core electrons and the remaining 3 are valence electrons. The valence electrons may participate in bonding through sharing with other atoms, to make three bonds. Three bonds = six electrons.
That is the simple answer. The way this question is posed indicates you are very new to the study of chemistry, and this next bit goes well beyond an introductory chemistry course.
For a fourth bond to form, another atom would have to donate two electrons to the bond. This happens in many cases, such as when an amine reacts. In other cases, an atom already bonded may donate electrons, such as in boron trichloride. Finally, borane gas itself can engage in 3-center two electron bonding which is really weird, but provides a full octet when two boron atoms share the bonding electrons in a boron-hydrogen bond.