What are different levels of permissions and how do that work in Confluence?

I’m currently engaged in a project that involves enhancing content accessibility by integrating Confluence data into search results. To accomplish this, I’m seeking a deeper understanding of how permissions are managed in Confluence.

I would greatly appreciate your insights on the following inquiries related to Confluence permissions:

I’d like to know more about the different levels of permissions in Confluence. How are these levels defined, and what actions can users with different permission levels undertake?

What are the available options for granting or restricting access to specific pages.

Understanding how Confluence determines who can view a particular page is crucial for our project. Are permissions based on individual users, user groups, or roles? Are there any particular criteria or settings that influence page visibility?