How do you know the state of an element or compound when writing chemical equations?
Unless otherwise known, assume the state of the element at room temp. Here is the real problem. For aqueous compounds, ie, compounds dissolved in water, you have to have that given. There is a big difference between NaCl (s) and NaCl (aq).Most common acids are in water, for instance HCl, H2SO4, HNO3. These are written HCl (aq). For products, often the product is not soluble in water, and it precipates...you will learn this later, anyway, here is an example:
NaCl (aq, saturated) + HCl (aq, conc)>>NaCl (s) + HCl (aq) + NaCl (aq, sat)
notice how some of the salt changes to a solid? Neat trick, your teacher may demonstrate this to your class some day, I hope so.
I will expand a little on the previous answer you have been given by Anonymous. His explanation is ok for compounds. Your question also covered elements and his answer is to take the state at room temperature. But what is that state? I will expand on that. If you have a periodic table handy, take a look at those elements listed. Almost all elements are solid at room temperature. The solid elements on my table are listed in black. There are a few exeptions. There are two liquids, shown in blue on my table, Br and Hg. There are 11 gases, shown in red on my table. H2, F2, Cl2, N2, O2, He, Ne, Ar, Kr, Xe. and Rn. So if you know the six inert gases and the other five gases plus the two liquids, everything else is solid. Some may argue that Fr, Cs, and Ga (shown on my table the same color as Br and Hg as liquids) are liquids but Ga has a melting point of 29.8, Fr has a m.p. of 27, and Cs has a m.p. of 28.4. A room temperature of 25 degrees C is 77 degrees F and these are higher than that. (The lowest of 27 corresponds to 80.6 degrees F.) I don't call that a compfortable room temperature and I don't consider them liquids. In addition to that, I think only a few atoms of Fr have been produced so that really isn't an issue. I hope this is useful.