St. Peter's Basilica is the world's largest church. Likely the most famous. The church most people think of when they see the Pope. A work of art by any definition. In spite of all this it isn't even the cathedral of Rome. Papal Archbasilica of St. John in Lateran being the oldest papal basilica is also the most important.
Visiting the square is fairly simple. You cross an imaginary line and leave Italy to enter the Vatican state. Early in the morning the security line to enter the basilica are fairly short. Your bag will be subjected to a xray screening. The usual security guidelines apply . Don't bring a large backpack or worse a suitcase. By mid morning the security line will stretch to fill large parts of the square. Not only will you face a lengthy wait to enter but when you do enter you'll face greater crowds potentially limiting your enjoyment of the basilica
In addition to the usual security rules (no knives ) you'll face the normal dress code. The rules basically mean no bare knees or shoulders. Men must have bare heads. Expect the rules to be enforced even if they aren't always. It makes no sense to stand in line to only find out you fail the dress code. Please turn off your phone or least silence it.
In addition to the basilica you can climb the dome.
Entrance to the basilica is free but the dome climb has a cost. The cost depends on which option you pick. You can choose to walk all the way up paying a little less. Or take an elevator for part of the way for a higher cost. Neither climb is extremely difficult but don't underestimate the climb. It will take some effort. You'll see the interior of the dome unfortunately there is a mesh grill that you will have to look through. Once you've reached the top there is a circular viewing platform giving you views including not just the square but the gardens.
There are two other sites in the area of St. Peter's. The Vatican museums and Castel Sant'Angelo.
For the museum you really should prebook your tickets. Lines can be extremely long.
For Castel Sant'Angelo the lines are rarely a problem.