You have to know the territory concept. You should be able to see how much is your territory in each situation. And then try to protect your territory.
When he is punching, protecting my face with my arms is pure defense.
Stretching my arm into his territory becomes fighting.
The difference is, I fight "in my house", I am right. He should get out. But if we fight in the street, then we don't know ... So, when he comes here, this is like we are fighting in my house. So it is defending.
But I saw that some people did enter in the opponent's territory. So now, it becomes street-fighting.
Sensei doing kokyunage irimi. So, that is the difference.
But that is defense and attack.
Now the Aikido way. So, my whole body is going forward, but without entering with my fist into his territory.