How does gaining levels work exactly? Does it involve simply descending deeper, meaning that there's no reason to kill more mobs than necessary?

Does it work like exp where you get a certain amount for every enemy defeated, adding incentive to obliterate everything on your path?