For your injury to be considered work related, it must
1) Arise out of your employment, and
2) Occur in the course of your employment
Arise out of means that the employment activity increased your risk of injury. For example, if you must lift heavy objects at work and you injure your low back. Or, if you must drive for work and you are involved in a car accident. There are many more examples.
In the course of means that the injury happened while you were working. Generally this includes the hours of the day you are at work along with safe travel into and out of the building. If you travel for work, generally your travel is protected by workers' compensation as well.
Workers' compensation is complicated with many exceptions and caveats. If you have any questions, or are being told by the employer and insurer that your injury is not work related, it is best to contact an attorney.