A precipitate is an insoluble solid that forms when two solutions are mixed. It happens when ions from the two solutions join to make an insoluble compound. To predict one, swap the partners of the two compounds, then use the solubility rules to check each new compound.
For example, silver nitrate solution and sodium chloride solution make silver chloride and sodium nitrate. Sodium nitrate is soluble, because all nitrates and all sodium salts are soluble. Silver chloride is insoluble, so a white precipitate of silver chloride forms.
Barium chloride and sodium sulfate make barium sulfate, which is insoluble, so barium sulfate is the precipitate. Sodium chloride and potassium nitrate would make sodium nitrate and potassium chloride. Both are soluble, so no precipitate forms. Copper sulfate and sodium hydroxide make sodium sulfate and copper hydroxide. Copper hydroxide is insoluble, so a blue precipitate forms.