Under common law, any hotel, inn, or other hospitality establishment has a duty to exercise "reasonable care" for the safety and security of its guests. This means that it does not have to guarantee the complete safety of their guests, but it does have to take reasonable precautions. If it doesn't, it is at risk of negligence, which is defined as “the omission to do something which a reasonable man, guided upon those considerations which ordinarily regulate the conduct of human affairs, would do, or doing something a prudent and reasonable man would not do."
There are several elements that are listed which hotels are to abide by in order to ensure they are following "reasonable care." First of all, they must conduct regular inspections to look for potential hazards on the premises, even if they cannot be easily seen or recognized. If it is found out that a hotel knew about a hazard and didn't work to repair it or warn guests about it, they can be sued for negligence if injury or damage occurs. However, for injuries that are the guest's own fault and not the responsibility of the hotel, the person themselves will be held responsible for their own injury. The example used in the link below is as follows: a person who slips after using the shower reasonably would be responsible for their injury, but if the hotel had a plumbing problem that left water on the tile floor in the bathroom, and the guest slipped, this would be the hotel's responsibility.
Secondly, hotels have a responsibility to protect guests from other guests. So if, for example, a guest is drunk or behaving violently, the hotel has a responsibility to either ensure that the guest is transported back to their room safely, or contact the police. With regard to drunkenness, hotels serving alcohol do have a responsibility to not over-serve alcohol to people who are appearing drunk. While hotels may not be able to reasonably prevent violent guests, if it is shown that they did not take necessary steps to combat unruly behavior, the hotel can be found as negligent.
Finally, hotels do have a responsibility to protect their guests and employees from third parties, but the rules for this differ from state to state and country to country. For example, several hotels have been found at fault in the United States for not providing adequate locks on doors and windows.