It has taken many centuries of wars and fightings for mankind to learn this.

---------------
What does the first word 'It' refer to in this sentence?

This is that same impersonal "it" I wrote about yesterday. Please see that other post and read the Wikipedia article that gives more information.