U hav to learn the short forms for the Elements. This can be done by going through the Periodic Table. Once u learn them, making a formula will be easy. :)
For eg- Say sodium reacts with Hydrochloric acid.
Sodium - Na (short form)
Hydrochloric acid - HCl (Hydrogen + Chlorine) (H+ Cl)
then the reaction will be- Na+ HCl -----> NaCl (Sodium Chloride) Salt + H (Hydrogen gas)
this is the primary level of understanding. Hope u did. :)