If your purpose of stay in Japan changes, you will also need to change your visa status.
If you have the "students"residential status, after you graduate from the school in Japan, and become employed in Japan, you must apply for your residential status to change.
If you have the residencial status of a "Spouse or Child of a Japanese National" and you become devorced, you need to change your status to an appropriate working visa. Alternatives, you may change to a "Long Term Resident"visa, but this will depend on how long you've lived in Japan. The Immigration Bureau will not cancel your visa within the valid period.