A deque, short for double-ended queue, lets you add and remove at both ends. Push and pop work on the front and on the back. It is a queue and a stack fused into one structure.
That is exactly what a plain stack or queue cannot do. A stack only touches one end. A queue adds at one end and removes at the other. Neither gives you free access to both ends at once.
This flexibility earns its keep in real work. Sliding-window scans, work-stealing schedulers, and browser history all lean on both-end access. When a single end is not enough, a deque is the natural next step.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.