When you arrive in the US, the immigration officer will stamp your passport with an entry date and the expiry date of your visit. You have to leave before that. It can range from 1 month to 6 months. You are able to extend your visa through the i94 website to a maximum of 6 months. If you overstay, then your B1/B2 will get cancelled and you won't be able to enter next time. So do everything legally.