The process in which a relatively unspecialized cell acquires the specialized features of an oligodendrocyte. An oligodendrocyte is a type of glial cell involved in myelinating the axons of neurons in the central nervous system.