Afinar, meaning “to tune” — as in, you tune your guitar — comes from the Latin finis, meaning, “border”: tuning a guitar is really finding the exact border between this note and the other one.
From the same Latin root finis, we get English words such as fine, refine (remember the re– prefix is just an intensifier), as well as the English finish.
Tuning your guitar, in other words, really is an act of refining the sounds.
The f-n root is clearly visible in all.