Yes, "favorite" is an adjective. "Favor" is a noun. You can also say "to favor (something)" to indicate preference.
When "my favorite" is used by itself, it indicates we already know what the favorite thing is. "Would you like some chocolate ice cream?" "Sure! My favorite (ice cream)!"
A favor is something kind you do. "Can you do me a favor?" or "I'll buy you an icecream. My favor." (= I'll pay for it)
And like the verb "to favor (something)", you can also gain someone's favor - that is, to gain their support or preference.