My Little Son Still Sleeping in My Bed!

My son is 2 years old and he sleeps with me since he was a baby. I am trying to get him to sleep in his cot, but he keeps crying. What shall I do?