Borrowed from Late Latin praefixum, from Latin praefixus, perfect passive participle of praefīgō "I fasten before, I attach in front".
Practice speaking and memorizing "prefijo" and many other words and sentences in Spanish.