Obama or Biden can run for the Senate or House while President or Vice President, but they couldn’t serve in both offices at the same time. And, if there were a need for the Speaker of the House or president pro tempore of the Senate to succeed to the Presidency, they’d have to resign from Congress to become President.
There is nothing limiting a Cabinet Secretary from running for Congress, either, but again, they couldn’t hold offices in the Executive Branch and the Legislative Branch simultaneously. There’s nothing preventing a Cabinet Secretary from heading two departments. During the War of 1812, for example, James Monroe served as President Madison’s Secretary of State and Secretary of War at the same time. Off the top of my head, I can’t recall whether there’s been a more recent example.