Birth control question

Summer
How do the nuvarings work? I know you put it up there but I don't understand how they prevent you from getting pregnant?