> did Republicans manage to keep being the ruling party somehow?
For most of Obama's years, yes.
> it seems even with a Democrat president Obama can't pass any law without going through them
No President can pass any law - wrong branch of government. And when the Legislative branch is indeed "controlled" (majority) by the opposing party, the President and the President's party would indeed have to "go through" the other party. But it's even worse. Although, in theory any Congress critter can start a Bill, bills usually must pass through a small committee first. And these committees are controlled by the majority party.
> is all this democrat/republican thing just theater
Maybe so. But you shouldn't come to this conclusion based on a lack of understanding of how the US system works.
Your questions suggest you're more familiar with a parliamentary system of government where (per Wikipedia) "the executive branch derives its democratic legitimacy from, and is held accountable to, the legislature (parliament); the executive and legislative branches are thus interconnected." In such systems, a majority party (or a coalition) forms a government and from this selects/appoints a top executive (Prime Minister) almost certainly from that party.
In the US, it's theoretically possible for the President to have no party affliliation whatsoever or to be a member of a party which ends up with none of the seats in Congress. In practice, this is very, very unlikely. But there's nothing tying these things together as in Parliamentary systems. The only real power the President has with regards to law making is the Veto. Once Congress finally gets their act together and passes something, it goes to the President who then either signs it or kills it (veto). And even then, the vetoed bill (usually) just goes back to Congress to give them one more chance. If Congress can vote again and pass it with a super-majority, it overrides the veto and the law goes into effect despite the wishes of the President.