Temples are the places where Jains have the idols of their Jinas (those who have conquered their passions). They go there to worship the Jina. All Jains don’t worship idols. The main reason to worship is to pay respect to the souls that have reached salvation. This also reminds us that we should be like them. Just praying and not taking any actions to free our soul does not work. We must discipline ourselves so that we can control our desires and karmas.
We should be silent in the temple and should keep it very clean.