Capacitor is an electronic device that is used to store electrical energy.
It usually contains a pair of flat conductors with opposite charges on each plate (in the case of a charged capacitor) thereby creating an electric field in between.
When a charged capacitor is connected to a closed circuit, it will discharge as one of its plates is positively charged (higher potential) and the other plate is negatively charged (lower potential).
The direction of the discharge, that is, the flow of the current will be from the higher potential (positively charged plate) to the lower potential (negatively charged plate).