to curse someone: to call down ruin on a person or thing, normally by invoking God against them, as the exact opposite of blessing them
To curse someone in the Bible is not to swear at them. It is to call for their ruin, normally by calling on God to bring it, so the words are expected to take effect rather than just vent anger. That is why the New Testament almost always sets this verb directly against blessing: to bless is to ask God for someone's good, and to curse is to ask God for their harm. In four of the six places the word appears, blessing stands beside it in the same sentence.
The commands that use it are pointed. Jesus tells his followers to bless the people who curse them (Luke 6:28), Paul repeats the instruction (Romans 12:14), and James protests that the same tongue praises God and then curses the people God made in his own likeness (James 3:9). What is forbidden in each case is not rudeness or bad language but the request that God bring an enemy down, which in the ancient world was an ordinary and even legal thing to ask for.
Twice the word describes a curse that has already taken hold. Peter points at the withered fig tree and calls it the one Jesus cursed (Mark 11:21), and in Matthew 25:41 the judge addresses the people on his left as those who stand under a curse. In these two places the focus has shifted from the asking to the result: the sentence has been passed and is now in force. The noun built on this verb (κατάρα) names that sentence and that condition, and a related adjective (ἐπικατάρατος) labels the person left standing under it.
It is a heavier thing than speaking abusively about someone (κακολογέω), which attacks a reputation, and it is not the same as placing a person or thing under a formal ban (ἀναθεματίζω), which hands the target over to God for destruction and often binds the speaker by oath as well.