No one likes to be rejected, but if you're a human being it's probably going to happen at least once in your lifetime.
Just because you may like someone that way, that doesn't mean they'll feel the same and learning to handle such things is part of growing up.