What is a rock n play used for?

I’m 33 weeks pregnant with my first. I’ve been reading online the rock n play is not safe for sleep. What do people use it for? Is it like a bouncer? Another place to put the baby down during awake time?