It depends on the type of alarm clock. If its a mechanical alarm clock, then there is probably some part loose. For electronic ones, you may need to replace chips.
An alarm clock that does not turn off likely has a critical internal problem related to it's failure to turn off. In a situation like this, i would recommend using a hammer to turn it off, then spend like $3-$10 on a new one.