kid putting them selves to sleep ?

when will my son be able to put himself to sleep instead of me having to rock him to sleep and how do i help him make that transition??