Are you talking about nail art foil or kitchen foil or maybe soft foil ?LOL
Nail art foils are fun if u get the right foil adhesive, I find the special FX foil adhesive seems to work well,
When you paint it on it should be white ,
It should turn clear, the clearer the better
Then place the foil on top shinny side up
Smooth it with a cotton pad, but try not to squish it to much I find if you over smooth it you move the adhesive about to much and get bold bits,
Then remove the foil and it should leave the foil attached to the nail,
Then top coat, some top coats are to much for the foil and seem to de solve it again special FX do a top coat , or spangles nail art sealer, your top coat might work try it,