Combine the barley and water or stock in the saucepan. Add the salt if using.
Bring to a boil over high heat, then lower the heat, cover and simmer, checking at 20 minutes for pearl or polished barley. Keep an eye on the pot as barley will give off a lot of foam at first and can cause the pot to boil over, for hulled barley, start checking at 40 minutes. The barley is done when it has tripled in volume and is soft yet chewy. Add more water if the pan becomes dry before the barley has finished cooking; check every 5 minutes until desired chewiness is reached.
When the barley is done, it will have absorbed most of the water. If there is a little water still left in the pot, just leave the barley to sit for 10 minutes, covered, until it has all been absorbed. If there is a lot of water left, drain the barley. If you want to cool it quickly to freeze, spread it out on a half sheet pan until cool, then measure and freeze.