Yes, this is a type of cockring. It makes it harder for blood to leave your penis, so you can keep an erection longer.

We probably see them in porn so much because a professional porn shoot will take so long to film, with many pauses, commands from the director, and so on. A lot of men like to wear them while having sex, too, to keep their erections. Just be careful if you wear one -- having one too tight or leaving one on more than an hour is usually not recommended, as it can cause serious damage.