The Complete Beginner's Completely Incomplete Guide to Oxygen Not Included
LIQUID LOCK BASICS
A liquid lock ensures that no gases will pass from one side of the liquid lock to the other, while still allowing dupes to pass through.
In Oxygen Not Included, a tile can only consist of one type of gas or liquid. There can't, for instance, be a bit of oxygen and a lot of water. Either oxygen or water, not both. The liquid lock uses this feature (or bug - however you want to look at it) to its advantage.
Using this same feature/bug you can build many different kinds of liquid locks. I pretty much always build the same kind, or a variation of it. So that's the one I'll cover here.
The liquid lock is two tiles high. That gives enough space for dupes to fit through.
When building the liquid lock I usually leave it three tiles high until I have added the liquid.
You can also fill the liquid lock even when it is just two tiles high, but liquid will pour unevenly as the Bottle Emptier will be partly inside the wall. (This can be used for a quick & dirty version of the liquid lock, covered below.)
Regarding how much liquid to use. The bottom liquid tile should be full. For water that is 1000 kg. If it less than full liquid can pour down from your other tiles and break the lock.
As far as the upper layer of liquid, there is no rule there - even a single drop of liquid will force out gases. But adding "enough" liquid can make the lock more robust and help avoid it breaking. How much is "enough"? I have no idea. My personal rule of thumb is: more than 100kg.
When the liquid is in place, build the upper tile (if you haven't already) and the liquid will be "pulled" up to the tile and force out the gas from that tile.
Quick & dirty (and a bit risky)
Having covered the safe way to build a liquid lock, I'll add that you can also just have a drop or two of liquid on tiles. I most often use this when building temporary liquid locks that aren't a big deal if they break. When vacuuming out a room, for instance.
To make one, use the above design but build the entire liquid lock before putting water in it. (Specifically, the tile that ends up covering the bottle emptier output.) Water will empty out onto the upper and lower tiles. Then just empty enough water that there is some on both tiles.
Choosing the right liquid(s)
You can screw up a liquid lock by using the wrong kind of liquid. (In case you're wondering: Yes, I speak from experience.) Here are some things to keep in mind.
Never use polluted water. Polluted water will offgas polluted oxygen. Which more than likely will mess with whatever it is you need the liquid lock for.
If your lock will be in a normal temperature range you can use water. If the temperature around the liquid lock is either below freezing or above boiling point for water, you need to use a different liquid.
To see the freezing point and boiling point (called "evaporation point") of a liquid, click on a tile of that liquid.
A scenario where you might need to withstand sub-zero temperatures would be a liquid lock to an ice biome or (the cold area before) space. For that, you can use ethanol for your liquid lock. Ethanol has a freezing point of -114C.
If you need a liquid with a low freezing point but don't have access to ethanol you can also use crude oil or petroleum, which both have a freezing point of -40C. The downside there is that they are likely to be hot and that heat will spill out into the cold biome.
A scenario where you might need to withstand very high temperatures would be hot geysers or (possibly) the oil biome. For that you can use crude oil or petroleum, which boil at +400C.
Stopping temperature transfer
You might want to stop (or minimize) temperature transfer between two areas. You can do this by creating two liquid locks and then creating a vacuum in the section between them.
Creating a vacuum is as simple as building a gas pump and pumping out the gases. (If your gas pressure is high where you want to pump it out to, you can use a High Pressure Gas Vent if you access to plastic, otherwise build a long gas pipe with several gas vents spread out over a large area. Or vent it into space, or into a gas reservoir.)
In the picture above I have used ethanol for the liquid lock by the ice biome. Since the liquid lock on the left is in "normal" temperatures, I used water.
In-between the liquid locks there is a vacuum to stop temperature transfer. Temperature can still transfer via tiles. To minimize this, you can use insulated tiles.
This kind of setup can be useful if you want to preserve an ice biome, for instance to preserve natural sleet wheat growing in the biome while still having easy access to it.
Liquid locks and atmo suits
When heading to the oil biome you might want to stop the heat from bleeding out into other biomes. You might also want to stop gases from mixing - for instance to keep the oil biome full of carbon dioxide for slicksters. Liquid locks can help with both things.
You will also (hopefully) have atmo suits, in which case there are a few extra things to consider.
If a dupe has an accident (or vomits from radiation exposure) while wearing an atmo suit, then the polluted water will stay in the suit until they take it off. In a row of atmo suit docks, this will happen on the tile with the atmo suit checkpoint.
Polluted water mixing with the liquid in your liquid lock can cause bugginess. To secure your liquid lock against that you can either make sure a dupe never gets stuck in an oil biome overnight (just kidding - you can't ensure that. Dupes be doing silly things and there's no stopping it) or you can add in some mesh tiles so any unwanted liquids fall below the liquid lock.
The same goes for any liquids that might pour down from your base. Having an area below your oil biome liquid lock where such liquids can pool - rather than pouring into your liquid lock - is not a terrible idea.
It is often a long way to the oil biome and you might not want your newest, slowest dupes to use an atmo suit to get almost nothing done. You can build a door by the entrance and use that to set permissions so that only the ones you want working in the oil biome are allowed in.
(It's generally safer to restrict entrance into an area but always allowing everyone to exit. That way if there is a dupe in the area who isn't supposed to be there they can still get out.)
And, finally, a visual reminder - which is 100% a picture I found on the internet and not something that has ever happened to me - of why it's a good idea to periodically check in on liquid locks you have under construction. (Oops.)