Why is פ in תפוח pronounced with a "p" sound while the same letter פ in אפרסק is pronounced with a "f" sound?
The letter 'פ can make both sounds, it depends on its nikkud (if there's a dagesh: פּ - the dot in the middle - then p, otherwise f). Without nikkud, there is no way to know, you just have to memorize when it's 'p' and when 'f'.
That said, there's one easy rule that might be good to remember: in all non-foreign words if 'פ is the first letter it makes a 'p' sound; and if it's at the end of the word (written like ף) it makes a 'f' sound.
As a speaker or Serbian (and other Europeans languages), I find it mind-boggling that all fruit I've encountered so far is masculine.
There are also many that are feminine: banana - בננה clementine - קלמנטינה mandarin - מנדרינה grapefruit - אשכולית guava - גויאבה blueberries - אוכמניות
Are all of those foreign import words? Although I can't make out the transliteration for each, I can see that most of those probably sound similar to their English language counterparts based on the consonants.
Funny how אפרסק sounds similar to the dutch "perzik". I wonder if there is an etymological connection...
I could imagine its the yiddish word for peach, because peach is pfirsich in german. I think it makes more sense when modern hebrew was invented, to use hebrew words and for the things where there were no ancient hebrew words they used yiddish because it was already the same script
When Zionists creates modern Hebrew, they used many sources, but I believe Yiddish was not one of them - Yiddish is exactly what they wanted to abolish! They much preferred more ancient sources.
Specifically אפרסק resembles the fruit name in many languages ("peach" also comes from the same); it started (according to https://www.haaretz.co.il/magazine/the-edge/mehasafa/.premium-1.4383383) from the Romans calling it "Persian apple". The form אפרסק, according to the same article, dates back to the Mishna.
Nouns that start with a vowel sound use "an" as their indefinite article: an apple, an egg, an igloo, an opera, an umbrella, an hour (the "h" is silent), a boy, a cat, a dog, a university (the "u" sounds like "yu").