The historical context to Trevor Noah's Born a Crime is the draconian laws of apartheid South Africa. It is thanks to these laws that his birth to interracial parents was considered to be a crime.
Two of the laws which segregated white and non-white people under apartheid are relevant here: the Immorality Act, which banned sexual relationships between members of different race groups, and the Prohibition of Mixed Marriages Act, which forbade white people from entering into marriages with people of color.
The stories in this book are anecdotes of Trevor's from growing up and living under the restrictive laws of apartheid. These laws dictated that he needed to stay as hidden as possible in order to conceal knowledge of his existence from the apartheid authorities.