Most typical homebrew PBs will have a cap that screws on and seals up the PB.
You will then normally pressurise the PB and the beer inside it by priming it with sugar that then ferments forming CO2 which generates an internal pressure in the PB and/or there is a valve in the cap which you use to inject CO2, typically from a cylinder or from one off shots from CO2 bulbs. All PBs should have a pressure relief device of some sort fitted in the cap to release excess pressure which protects the PB and in the worse case prevents it rupturing.
If you do not add priming sugar or CO2 you will not be able to get much beer out of the PB, before you either a) gurgle air in through the tap to balance the inside and outside pressures or b) vent the cap to balance the air pressures. Either way letting air into the barrel especially via a) will cause the beer to go off quite quickly.
If you are still unclear about your PB/cap set up I suggest you post a photo so that people can have a look and advise you.