Years ago -- decades, in fact -- some state tourism office down in Florida offered a prize, somewhere in the mid five figures, to anyone who could come up with an answer to that question that would be authoritative enough to generate agreement by all as to a proper definition, and thus written into law whenever a legal distinction had to be made or acknowledged.
The prize remains unclaimed to this day*.

The closest anyone has ever come to a definition that has met with some agreement, is based upon the means of access to the rooms: Hotels - with some exceptions - have interior corridors, and you leave your car in a parking lot, enter through a main lobby, maybe take an elevator, and walk down an interior hallway to your room. Motels (the term 'motel' originated as a portmanteau word for 'motor hotel') have exterior corridors: you can park directly in front of your room (quite often, if you're on the ground floor, you can park directly in front of your door).
The prize remains unclaimed to this day*.

The closest anyone has ever come to a definition that has met with some agreement, is based upon the means of access to the rooms: Hotels - with some exceptions - have interior corridors, and you leave your car in a parking lot, enter through a main lobby, maybe take an elevator, and walk down an interior hallway to your room. Motels (the term 'motel' originated as a portmanteau word for 'motor hotel') have exterior corridors: you can park directly in front of your room (quite often, if you're on the ground floor, you can park directly in front of your door).
Usually.