One of the more common uses for a capacitor is power supply decoupling where the mebrane description works prety well, you can think of it as a section of pipe made out of rubber. When the pressure goes up relative to the outside of the pipe the pipe deforms and stores energy, when the pressure drops the membrane relaxes and provides a buffering effect on pulsations in the water pressure. Devices like these actually exist in the real world, they're used to prevent standing waves from building up in pulsating pump system, you hit the wrong harmonic with a complex plumbing setup and the entire system would resonant.
Another way to look at capacitors is as AC decoupling caps where it would be a flexible membrane cutting a pipe in half to block water flow, it'll still let pressure waves pass but it won't let water flow.