Chemistry, despite being several hundred year old science, it is still very much empirical. In the beginning you will have to learn and accept some facts. Later you will start to see patterns (hence the periodic table). If you learn that the carbonate of barium decomposes into carbon dioxide and barium oxide, it will be safe to say that Mg, Ca, Ba, Sr, will do the same. Here you have learnt four more chemical reactions. If you recall the periodic functions in mathematics, which repeat themselves periodically, in the same way, elements repeat their properties in the periodic table.
When you strongly heat inorganic salts, usually you get smaller products (e.g., carbon dioxide and barium oxide) which are energetically more stable with respect to the starting material.