The Phoenician form of the letter was adopted into Greek as a vowel, upsilon (which resembled its descendant 'Y' but was also the ancestor of the Roman letters 'U', 'V', and 'W'); and, with another form, as a consonant, digamma, which indicated the pronunciation /w/, as in Phoenician. Latin 'F,' despite being pronounced differently, is ultimately descended from digamma and closely resembles it in form.
After sound changes eliminated /w/ from spoken Greek, digamma was used only as a numeral. However, the Greek alphabet also gave rise to other alphabets, and some of these retained letters descended from digamma. In the Etruscan alphabet, 'F' probably represented /w/, as in Greek, and the Etruscans formed the digraph 'FH' to represent /f/. (At the time these letters were borrowed, there was no Greek letter that represented /f/: the Greek letter phi '?' then represented an aspirated voiceless bilabial plosive/p?/, although in Modern Greek it has come to represent /f/.) When the Romans adopted the alphabet, they used 'V' (from Greek upsilon) not only for the vowel /u/, but also for the corresponding semivowel /w/, leaving 'F' available for /f/. And so out of the various vav variants in the Mediterranean world, the letter F entered the Roman alphabet attached to a sound which its antecedents in Greek and Etruscan did not have. The Roman alphabet forms the basis of the alphabet used today for English and many other languages.
The lowercase 'f' is not related to the visually similar long s, 's' (or medial s). The use of the long s largely died out by the beginning of the 19th century, mostly to prevent confusion with 'f' when using a short mid-bar (see more at: S).
In the Hepburn romanization of Japanese, ⟨f⟩ is used to represent [?]. This sound is usually considered to be an allophone of /h/, which is pronounced in different ways depending upon its context; Japanese /h/ is pronounced as [?] before /u/.