The apple, usually cut in half or in a thick plank, is to place behind the ear that's being pierced so the needle will go through the ear and then into something that won't be injured by a needle and that'll keep the needle from sticking the "piercee" in the neck or side of the head. It's a tried-and-true home-piercing aid. Sometimes people use a piece of potato instead. Serves as a firm backing and a sort of "pin cushion" for the piercing needle once it goes through the ear.

Clean that wound well. If you can remove the safety pin and put in your stud, do that. I'm hoping the hole you pierced is big enough for your stud. A sewing needle often isn't quite big enough. If you have to leave the safety pin in for now, make sure you twist it periodically so the pierced skin doesn't heal/stick to the pin. The best cleaning solution is hydrogen peroxide or a mixture of half hydrogen peroxide-half drugstore saline. You need to clean it daily and let either the stud or the safety pin stay in there for about three weeks till the hole heals over and seals. Even after that, you need to keep a stud in it around the clock so it doesn't heal over.