Inherited from Latin pīnea. Compare Galician and Spanish piña.
Practice speaking and memorizing "pinha" and many other words and sentences in Portuguese.