sleeping with a pillow healthy?rather a bad habit?does it keep your back bone and neck in position?

i want to know from doctors point of view.i have heard people say that using a pillow is ot healthy for your back bone and neck.