Place beans, water, onion, and bay leaf (if using) in the inner pot of a pressure cooker.
Place lid on Instant Pot and close valve to 'seal.'
Cook on High Pressure for the following times: Black Beans--30 Minutes, Chickpeas--40 Minutes, Kidney Beans--35 Minutes, Pinto Beans--25 Minutes, Navy Beans--25 Minutes, Butter Beans--40 Minutes, Great Northern Beans--35 Minutes, Cannellini Beans--35 Minutes.
Allow to naturally release until pressure subsides, or at least 20 minutes before doing a quick release.
Once beans have finished cooking, stir in salt and vinegar (if using).
Store cooked beans in a bit of the cooking liquid to keep them moist and tender while they sit in the fridge.