If there is an algorithm that answers YES when the correct answer is YES, and runs forever when the correct answer is NO, then the problem is partially decidable. A problem can be both undecidable and partially decidable. One example of this is the halting problem.
If there is an algorithm that always answers correctly, both for YES and NO answers, then the problem is decidable, and is not undecidable.
A formal language is said to be undecidable if the decision problem "is a given string in this language" is undecidable. (See further: Decidable language)