A white precipitate of barium sulfate forms if sulfate ions are present. The hydrochloric acid is added first to remove any carbonate ions that might be present - they would also produce a white precipitate, giving a false positive result. Barium nitrate solution can be used instead of barium chloride solution
Reactions require successful collisions between elements or molecules. A rise in temperature increases the movement of molecules. The more movement, the more collisions. The more collisions, the more reactions. The collisions release energy as heat which warms the flask and so on.