You level up by earning XP through activities like harvesting, collecting from Gear and Animals, making Recipes, claiming ribbon rewards, and more. Once you reach a certain XP threshold, you level up.
Your XP Star/Bar is located at the top-right corner of your game screen. To see how much XP you need to reach the next level, hover your mouse cursor over it.

You can also customize the Star/Bar so that the Bar always shows. Just open your Settings and make sure this option is ticked.

When you click on the XP Star and a new window will pop up.
The Next Level tab shows what rewards await you when you reach the next level and what items you will unlock.
Each time you level up, you’ll receive 1 to 4 Ranch Cash (based on your level) and some Coins. Your Fuel, Power, and Energy will also be fully refilled.
