You can purchase cooked food from many merchants, or can kill and skin wild animals.
To cook some raw meat, use an oil flask on the ground to create a fire, then use the meat on you (if you nearby the fire, the food will get cooked)
Rest Limits:
You can rest once each 4 in-game hours (8 real time minutes) ONLY if you have a bedroll (can be purchased from many merchants, if you lose yours).
You can rest once each 24 in-game hours (48 real time minutes), if you DON'T have a bedroll with you.
Wandering Creatures:
If you rest from outside a safe zone (outside of cities, or into dungeons, or into wild areas, etc), you and your party can be ambushed from local encounters.
When this happens, you are warned and suddenly awaken.
Inns:
Resting inside of an inn is allowed at any time (the default cooldown is not applied).
To rest inside of an inn, you have to rent a room from the inn master. Once rented, the room will be available to you for 24 in-game hours (48 real time minutes)