There's no easy, comfortable way to handle things when romantic feelings develop in a friendship. Once the cat is out of the bag, it's difficult to restore your friendship to a place of ease and platonic functionality. Still, if both parties are devoted to preserving the friendship, it's possible to work through the issue of one of you falling in love and come out on the other side with a stronger companionship and deeper knowledge and understanding of one another.
Wait to discuss the issue until your friend brings it up, and then give him a gentle, tactful rejection. If your friend doesn't bring it up but you suspect he has feelings for you, let him keep them to himself. If he tells you, make sure you understand his reasons for telling you before you respond. It's possible that he just wants you to know for the sake of openness and understanding in your friendship and doesn't necessarily hope for anything to happen. In any case, make it clear that you find his affection flattering and that you don't blame him for feelings he didn't choose to have. Tell him that you genuinely hope the two of you can remain friends, but that it may be a challenge to work through these feelings.
If your friend expresses romantic feelings in the hope of developing a romantic relationship and you reject her, you may need to establish certain emotional boundaries and defend them. Make it clear that you have no interest in her romantically and that it's not acceptable for her to interpret your genuine, platonic expressions of friendship and fondness the wrong way. Tell her that you are interested in a friendship and that if she is interested only in romance, your friendship will not be able to survive. Be wary of any inclination on her part to treat you as a romantic partner emotionally or to pressure you to be emotionally open and available to her as if you were, but bear in mind that she may not be aware of doing this. It's up to you to decide if your friendship is worth these trials and challenges.
Even if things are going well between you and your friend in terms of respecting boundaries, you may need to give him a little space after the rejection. This will help prevent him from dwelling on what happened and on what he can't have with you. Spend time together less frequently, or spend more time in the company of mutual friends rather than one on one. Make sure you don't stop spending time together completely, however; you don't want to send the message that you are uncomfortable around him.
If things seem awkward at first, recognize that they will get better with time. Over the course of months and years, her feelings for you will become less intense and your comfort with each other will be restored. As long as you are both committed to keeping your friendship and respecting one another, you will be able to weather this situation. Be wary of losing the friendship because of any awkwardness you feel now.