Depending on your type of visa, you can stay in the US as long as you are permitted. However, you can’t overstay your visit as it is a punishable offense.