If its a (old) friend yeah the only thing you CAN do for them to get the hint and you usually never want to talk to them again is to avoid them completely. Make sure things are noticable and they will get the idea. But if its like a relationship kinda thing. I personally have learned that the other person is the one that has to change, so you have to do and say things to make them not like you. I always try to make people my friend first now before i go into the whole relationship kinda deal, because if things dont work out at least we can be friends and still talk, at least we still "like" each other. But sadly even for me, a boy, occasionally i get the girl whos just straight up OBSESSED with me before they even know who i am, and i HATE IT. It makes things sooooooo hard, i cant think about anything other than, "why are they looking at me, what are they thinking, oh god what do i do" in that case i rarely say anything to them, dont make eye contact, kinda just lean them away. Yeah it is "mean" but its alot better than just straight up ignoring. I hope this helped even a little. And goodluck.
Another thing, people just dont get it. Its like, oh yeah i think that persons hot, they think im hot, okay now they do it. Thats just jumping to the end of the relationship in all honesty, so if you feel like being used just keep on doing your skipping steps instead of just regularly talking to them. Have a slight ego comon now people, quit being so easy and out there im sick and tired of it.... and im only 19. Its pathetic...