You need to ollie of course. Being able to land kickflips helps. Get your feet in ollie position. Hang some of your front foot off (the toe of your foot). Some people like to keep thier feet in plain ollie position to do this. Don't. Even though it feels comfortable, hanging a little bit of your foot off will make it flip fast as hell (you only have to hang about an inch off). Pop the tail down and slide your front foot up and kick it off. Just before your front foot goes off the board make your heel rub against the board by pointing your toe up toward the sky. Unlike a kickflip, you have to pop faster and flick your foot off faster and harder. After you get the board to flip just stay above the board and put your back foot down to stop the rotation followed by your front foot to finish the heelflip. Get good at these and try them off ledges and shit.