How To Teach A Kitten To Use A Litter Box?

I have a kitten and she is about to be 1 year old. I was wondering what the best way would be to teach her how to use a litter box. Is it even necessary? She uses my bed as her bathroom, so I don’t want her using the same spot for peeing all of the time…