My boyfriend and I have a long-distance relationship for a while now. I visit him in Japan, and he visits me in New York, but we are separated by a huge distance. I want to propose to him so he can live with me here in New York. My question is, if I marry him, what happens with his status? Does he become an illegal immigrant after his visa expires, or does he obtain legal "residency" status in the US?
You may want to ask this on Expatriates. There are many questions there already on this topic, so have a look around.
Being married to a US citizen has no automatic impact on anyone's immigration status.
The first thing you should do is decide whether you will marry in the US or elsewhere. If you want to marry in the US, and your boyfriend is not in the US, he should apply for a K-1 fiancé visa. With that, he can enter the US, marry you within 90 days, and then apply to adjust his status to that of a permanent resident.
If you decide to marry in the US when he's already in the US, you can just get married and apply to adjust status, but you may need to prove that your decision to marry was reached after he entered the US, because entering on a B visa or with the VWP requires the intention not to stay indefinitely, so entering in either status with an intention to marry and remain could be taken as fraud.
If you decide to marry outside the US then he will need to apply at a US consulate for an immigrant visa.
As part of the process, whether adjustment of status or a visa application, you will file a petition for him to immigrate. The petition must be approved before the adjustment of status will be granted or the immigrant visa issued.
Once the adjustment is complete, or when he arrives in the US with his immigrant visa, your husband will be a permanent resident (also known as a green card holder).
It is important to note that if your boyfriend accrues any unlawful presence, he should remain in the country, marry you if you are not already married, and apply for adjustment of status. He will find it much harder to get an immigrant visa abroad than to adjust status, especially if he accrues more than 180 days of unlawful presence, in which case he would trigger an automatic ban for three or ten years by leaving the country.