Perhaps your boss is like a mentor to you, or maybe you two have connected on a deeper level and spend time together outside of work. Unfortunately, this connection doesn't shield you from disagreements. Nor does it change that fact that she’s your boss.
If a conflict comes up, stay professional and friendly rather than jumping on the defensive. If the conflict was small — like a disagreement that got a little more aggressive than necessary — send a quick email to smooth things over. If the situation escalated to the point of hurt feelings or unprofessional behavior, schedule a time to talk about it outside the office. Having some time to cool off and the ability to talk away from your desks will give you a better chance of emerging with your working relationship and your friendship intact."