At least in the US – the deep state concept goes back to Kemalist Turkey – the term “deep state” refers to career government officials – particularly those in military, diplomatic, intelligence, and law enforcement positions – and their private sector allies (many of whom hop in and out of government themselves) who pursue their own agendas regardless of who is nominally in control. The basic idea is that while the American people may vote for Democrats or Republicans, liberals or conservatives, the deep state remains a constant and doesn’t bend much (if at all).
When Eisenhower warned of the “military-industrial complex” in his farewell speech to the nation in 1961, he was essentially warning of a form of a deep state, even though he didn’t use those words. The deep state was also criticized throughout the Cold War, usually by the left, in pointing out actions committed by the State Department, Defense Department, and CIA, oftentimes with elected officials having little to no knowledge until long after the fact. The term “deep state” really began being used in earnest to describe the tightened, and more connected, security state that was enacted after the 9–11 terrorist attacks, and again, was typically a left-wing criticism.