Hi Ridwan ,
Many words in french follow the gender logic , so words like ( homme, garcon , pere etc ) being masculine will have the "le / un " as definite and indefinite articles.
On the other hand words like ( femme, fille , mere ,soeur etc ) will have the "la /une" as articles .
But this rule does not apply to all things such as in the "pomme" example.
You can't simply compare with another language like English and say it is masculine in that language so it should be in french .That rule does not apply!
You will have to learn many article genders by heart , use and practice without any logic behind them
It is a matter of practice :)