This is probably a really stupid question..

What are the reasons behind aluminum chloride being AlCl3 and Potassium Chloride being KCl? Wouldn't the subscript stay the same? Also, what is the difference between chlorate and chloride? For example, potassium chlorate and potassium chloride. Thanks again!