Prince Prospero has several responses to the red death.
The first response is isolation, a form of self-quarantine. He gathers 1000 friends and they all take refuge in an abbey. They were physically distant from the mass of the populace. There are also walls and gates between them and the people outside.
The idea of this is to create physical barriers between the prince, his friends, and the diseased mass of people outside.
This is one of the responses. So is the idea that he can separate the ill and the healthy, and only associate with healthy people.
After that, the prince and his friends respond to the plague by denying it: they have a giant party. They drink and dance to forget the sickness. And one detail of that is the final response: they wear masks, which means they hide from the plague.