A curse is a negative effect that reduces ability scores, and that is notoriously hard to be rid of. Most curses have no time limit, and they are typically supernatural effects (so not removed by resting). The only spells that have an effect on curses are greater restoration and remove curse. In the absence of these spells, the only way to remove a curse is through a module-specific feature. (Many modules offer "temple healing" that will remove a curse.)
Immunity to ability decreases will prevent a curse from reducing ability scores, but it will not block the curse itself (subjects are still reported as being cursed).
The most notable source of a curse is the spell bestow curse.