Have you looked up prolapses in snakes on google? The information I am finding suggests trying to push it back in with some lube and a gloved finger. It also says that failing that, you need to make a vet appointment.
Common causes consist of dehydration, parasites, and overfeeding