Q:

Sentence structure -- aber after subordinate clause

I wrote up a (somewhat complicated for me) sentence in order to learn a few irregular past participles and to practice subordinate clauses and I want to make sure I understand the structure. Here is the sentence:

Ich bin geblieben, weil ich geglaubt habe, dass es Küchen gegeben hat aber ich habe nicht gut verstanden.

Question number 0 is whether this sentence is correct. 
The main question is how to think on the structure -- should I think that I have two "main" sentences, one before the aber and one after it, and that the first one have two subordinate clauses?
Said differently, whenever I start with aber I start a new main clause? 

A:

Your sentence has more or less the correct grammar, but your word choice is not so good. So if you're just after the structure, you almost nailed it. You would probably say ich habe es falsch verstanden and you must add a comma after the end of the subordinate clause, regardless of what's following.

Ich bin geblieben, weil ich geglaubt habe, dass es Küchen gegeben hat, aber ich habe es falsch verstanden.

Another note: You're saying that you assumed free kitchens. I assume you wanted to say free cake. Cake is Kuchen in the plural though.
Concerning the structure: Yes, you can think of this as two main clauses connected with an aber where the first of the two main clauses has an added subordinate one.
Not all aber introduce a main clause, though:

Wenn du Kuchen möchtest, aber keine Küche hast, musst du eine Konditorei besuchen.

Here, aber introduces a second subordinate clause. It depends on what you're connecting the aber-sentence to. If you connect it to a main clause, it introduces a main clause; if a subordinate one, a subordinate one. This is analoguous to the English usage, by the way (although it's hard to recognise a subordinate clause in English).

