Borrowed from Old Tupi peteka, from petek (“to slap”), although the term in that language didn't refer to the object.
Practice speaking and memorizing "peteca" and many other words and sentences in Portuguese.