Add the barley (1 cup), water (2 cups), salt (1/4 teaspoon), and olive oil (1 tablespoon) to your pressure cooker. Stir together.
Make sure the vent is set to "sealed." Cover the pressure cooker and set the pressure to manual, high, for 20 minutes.
When the time is up, quick release the pressure by using a wooden spoon (or something similar) to change the vent from "sealed" to "venting."
Once the float valve has depressed and it's safe to open, open the pressure cooker and fluff barley with a fork.
To use hulled barley, follow the same instructions but rinse the barley under cool water in a colander before adding to the instant pot, use 2.5 cups of water, and set the time to 25 minutes instead of 20.
The instructions used to say 2.5 cups water, but I changed it to 2 because of lots of reader feedback that there was liquid left. I think brand, size, and age of the barley has a lot to do with this - if you have any extra liquid left, you can just drain it out like you would pasta!