Since I don't know anything about air conditioners, I thought you might have an answer. I noticed that when my A/C is on and all the windows and doors are closed it is actually working for a few minutes then it stops for much more time and then it repeats this exact same pattern. On the other hand, when the windows are open it does not stop working. I was thinking that maybe when all the doors and windows are closed there is no room for the extra air molecules (which means the pressure stay constant - for my poor understanding) therefore it stops working, but I don't know how these things work so I'll be happy to hear some of your wisdom.
While colder air is denser, and would lower the pressure in a perfectly sealed room, this is not why an AC would shut off. The pressure would not really change, as there are plenty of minute openings or cracks in the average house for inside pressure to be near equal to outside pressure. Most likely the thermostat cuts off the AC when the room cools down, then turns it back on when the room warms back up. With the windows open, the room does not cool down enough for it to shut off.
A trained technician may be needed to diagnose those issues. There are many things that can go wrong with an A/C, and some of them are better caught early. However, what you describe sounds absolutely normal. Air conditioners are controlled by a thermostat. Once the A/C has cooled the room down to a certain temperature, it stops. If your windows are open, you'll be letting a lot of warm air in, and your air conditioner wont be able to make things cold enough to reach the temperature (running all the time).
An easy test: drop the temperature on the thermostat. It should take much longer for the air conditioner to stop (because it has to chill the house more). Then raise the temperature on the thermostat back up, and it should be a while before the air conditioner has to turn back on.
As for your actual question, air conditioners cycle air. If you look in your house, you'll find some very large vents that don't look like the others. Very likely you'll be able to see a filter behind them. Those are the return vents. When the air conditioner's fan is on, it pumps air out of the normal vents, and then the air is returned through the return vents, completing the cycle.
In typical house construction, air flow like this is accounted for. An air conditioner does indeed raise the air pressure in the room a little bit. This pressure is part of the natural flowing of the air. The air finds its way underneath doors and flows back to the return vent. If necessary, one can also install return ducts which go around doors (you'll sometimes see them installed directly above the door). Generally speaking there will be enough air flow to keep things working properly (some A/C specialists may argue that there's not enough airflow to be maximally efficient, but there's airflow).
Most A/C's run full blast when thay run. They are either on, or off.
If you have sized the unit properly, it is more than powerful enough to cool the room. So it must shut off, or the room will be too cold.
So they start at a particular set point temp (say 27C) then they cool full-blast until they reach a target temp (say, 24C), then they shut off. This is normal.
With doors and windows closed, this is that, working normally.
With doors and windows open, you are trying to air condition the whole world. The air conditioner keeps running and running because it doesn't have enough power to get the whole world down to target temperature.
You need a much larger air conditioner to do that :)
As others mentioned, the a/c will continue to run if you have the windows open, b/c the cold air is getting let outside. An ac recycles the air. It pulls in air, removes heat, pushes the air out, and repeats. It actually pulls in the same air over and over, cooling it a little more each time. So with the window opened, you introduce more hot air into the process. Also, You mentioned that when the room is sealed, it is a few degrees away from what you are asking for. It sounds like the thermostat is in another room, lets say, the living room, and you are measuring the air inside, lets say, your bedroom. The bedroom is warmer than the living room, and the ac shuts off when the thermostat gets to the target temp of the living room. You are wondering how to get the bedroom the same temp as the living room. Is that right? This is a duct / air balance issue. The bedroom likely has no return vents. Therefore, the cold air can't come in, because the warm air can't get out. Try cracking your bedroom door open a little. You will may hear it whistling, or be able to feel the air being pushed out. Leave it like this for several cycles, so, lets say an hour. Then measure if the room is the same as the living room. If that worked, you may want to consider installing a return duct or a jumper duct. Make sure the register is open as well. Change the batteries in your thermostat, and change your a/c filter.