Better to know and have them never be around you again than to have it fester.
As far as how you tell them you like them, well, that partially depends on how well you know them and upon your current intentions with regards to them and interest in them.
You don't tell someone that you feel could/is becoming the best BFF ever this news in the same way that you tell someone that you're interested in finding out if a romantic relationship would work out between the two of you.