Yep all you have to do is tell him that if you upset him in any way ( and you don't know what you did ) then just say sorry,you didn't mean it and let's move on.
There is this boy I like and for some reason he never really has liked me to much. I don't know why. Is there a way i could say sorry to him even thoo I don't know what I did?
Its a matter of perception. It doesn't matter whether or not you feel you did anything, he apparently feels you did. Maybe its something you said to someone else that got back to him. Whats the point of having it bug you forever? End it one way or another by walking up to him when he's alone and asking him if you did or said anything to dislike you. If he says yes, it may be something innocent you can explain. If he says no, then suggest you improve communications by having lunch together or something. Depends on how much you want it to work.
You know if you have done nothing to him and he doesnt like you then forget about him and find someone who does like you and appreciate you for who you are