When someone has you in their romantic sights, but you just don't feel the same, it can be quite uncomfortable. Especially if that person is a close friend or co-worker. You may feel terrible about hurting their feelings, but it's better to let them know right off the bat, than to drag it out when they have developed even more feelings for you.
If this is a person you have not yet dated, but want to make sure you are not giving them the wrong idea, then when they say things that indicate their feelings or ask you out, make sure to give them the truth. No one wants to be lied to. Tell them that you are flattered by the attention or the invitation, but you just don't feel the same way. Tell them you value their friendship, but never let them think there might be a chance sometime in the future if you have no intention of ever going out with them. Leading someone on is crueler than just stopping it in its tracks.
If this is a person you have been dating it can be a little more tricky. Since there has already been some connection made it, might make the break up even harder. Just like before be honest, and never say: "it's not you it's me". That is so cliche that it's borderline insulting. You need to be prepared for whatever the reaction to this news will be. Will there be tears? Will there be anger? Whatever it is just be understanding and comforting. I'm sure you have had your heart broken a time or two before, just remember how that felt so you can empathize with them. If possible try to end it on a good note. Make sure to smile, and a good-bye hug may be appropriate.
After having tried all of the things listed above and the person still won't listen, then more aggressive steps need to be taken. You may need to be clearer on what your intentions are. Be very direct and use a serious tone so they know you mean business. Still be gentle, but firm. Break ups and rejections are never easy for anyone, whether you are doing the rejecting or being rejected. Just remember to be understanding and don't get made to feel guilty and get stuck into a situation that is not right for you.