A cell that forms the myelin sheath (a layer that covers and protects nerve cells) in the brain and spinal cord. An oligodendrocyte is a type of glial cell.