A branch can be both ahead and behind at the same time if you have made changes to your branch, and someone else have made changes on the default branch that you have not merged into your branch yet.