The fight between Uzumaki Naruto and Pain (Real Name: Nagato) began in 167 episode and finised with the death of Pain. Pain came to the Hidden Leaf village to make a destruction and made a hole in the heart of the village. After that Uzumaki Naruto had come to defeate Pain, completing his training. Though he managed to defeated four pain, he had been caught.
When Hinata got hurt to save Uzumaki Naruto, which made him angry and triggred the Nine-Tail-Fox to come out.