Should you be injured or fall ill while working, the Labour Standards Act states your employer must cover your medical expenses and pay any necessary compensation. Since such costs can be large the Workers' Compensation Insurance was created, and all employers must pay into this. Japanese residents are covered by the National Health Insurance plan for illness or injury. All large businesses are responsible for making sure their employees are suitably insured.
As a foreign resident in Japan you can subscribe to the National Health Insurance plan as long as you have completed your alien registration. This is not an option for those coming to Japan on short term visas however. You can find out more about National Health Insurance at your local ward office.