How to achieve this look:
Paint nails black (I used Sinful Colors' Black on Black)
Apply foil adhesive on the top 3/4 of the nail.
Apply the foil (it's okay if it's not perfect, holes will make it look better)
Take a fan brush, and brush upwards, creating rough edges along the sharp line created by the edge of the foil.
For the rainbow, I used two separate foils from Dollar Nail Art: Citrus Flash and Wildberry Flash to create the rainbow effect.
The adhesive reacts to certain topcoats, so don't use anything that's fast drying. I used Revlon's Extra Life No Chip Topcoat and it doesn't seem to react like the others.