The original meaning of inn was lodging and food for travelers, although today some inns don't have a restaurant or bar attached. If you own or manage an inn, you're an innkeeper. Inn comes from the Old English inne, inside or within.
The very first pubs to appear in Britain were actually Roman taverns, which served alcoholic drinks and food. Later, those taverns that had been granted licence to put up travelling guests in their rooms were known as inns.