After a certain point, Bai Huan is introduced to battle. At first there will be very little you can do during combat but later on you will be able to take more action.
Battle is active and allows for switching of battle stances. Each battle stance has a different benefit and should be used to affect the outcome of a fight. There are four total and they are listed below:
There are also various other factors to take note of during combat, chief among them is the swap stance ability. Every 5 seconds you can swap stances and doing so empties this meter, causing it to refill again.

Next is the R%, this value affects how likely a stance's secondary ability will activate. For example, Defensive Stance's Cancel Dmg will activate more often if the R% is high.
Finally, the most important aspect of battle is the ability to switch your combat style. There are three options, Martial, Spirit and Weapon (weapon is unlocked by story events). Depending on your stats, equips, mastery and other factors you will deal damage automatically as the fight wears on. This is one of the most important factors to winning a battle when coupled with your battle stance.
Your current style must also match with the skills you have equipped in order to use them, as an example Martial Skills require using Martial Style when activating them. This is important to note, as you generally want to learn skills and abilities that support the direction you choose to build your character.
Lastly, as you fight , you may find that companions will aid you in various ways. This will be expanded in future versions of the game.
Once you lose all of your health in battle, it's defeat! And you will suffer greatly from it. Yet there may also be hidden benefits. Make sure you use all your knowledge of battle mechanics to be successful.