The word “punish” is used to talk about someone causing another person to suffer because that person did something wrong. The bad thing that this person suffers is called a “punishment.”
In the Bible, the words “punish” and “punishment” are often used to talk about God causing someone to suffer for sinning against him (see: Matthew 25:46; 2 Thessalonians 1:9; Jude 1:9; Revelation 18:10).
God punished the Israelites when they disobeyed him, especially when they worshiped false gods. God punished the Israelites by allowing armies from other nations to defeat them (see: Jeremiah 4:18; 23:12).
Because God is righteous and just, he must punish people when they sin. Every person has sinned against God and deserves punishment. However, Jesus is different from all other people. He did not sin against God. He did not deserve to be punished. Even though Jesus did not deserve to be punished, he was punished for all the evil things that every person has ever done and will do (see: Isaiah 53:1-12; see also Romans 3:21-26).