Penalties scale with intent and severity. For a genuine oversight, like a forgotten apple or being slightly over the allowance, many countries let officers use discretion: the item is confiscated or duty is charged, sometimes with an on-the-spot fine, and you're on your way. Biosecurity-strict countries are harsher and fine even honest mistakes, which is why declaring everything is the golden rule.
Deliberate false declarations move you into a different category. Expect seizure of the goods, fines that are often a multiple of the duty evaded, and a violation record that means you get searched on every future arrival. Serious smuggling, meaning drugs, weapons, wildlife products, or large undeclared cash, brings criminal prosecution, potentially prison, and for non-citizens, deportation and entry bans that can also complicate visas elsewhere.
One more thing people forget: undeclared currency above the reporting threshold can be seized in full in some countries, not just fined. When in doubt, declare; the honest path is always the cheap one.