Declaring a person that believes that he is Muslim as non-Muslim is a very serious matter. There is actually a school of thought behind it. First of all, only scholars which fit certain criteria have the authority to make such claims. Secondly, there are only a few cases that give them ground to judge a person as non-muslim. For example a Muslim who drinks, is still a Muslim. A Muslim who sinned, but nevertheless still a Muslim. A Muslim who starts worshiping a false deity on the other hand, can by all logic no longer be called "Muslim".
Just to make things clear, I am not making takfeer of anyone. Not everyone who commits kufr is a kaafir, in the same way that not everyone who commits shirk is a mushrik. But the general principle is, denying/disbelievng in a part of Islaam is kufr.
There are different types of kufr, and one of them is the kufr of ta'teel (the kufr of denial), as referred to in the following verse:
"And who is more unjust than he who forges a lie against Allaah,
or rejects the truth when it comes to him? Is there not an abode in Hell for those who disbelieve (kaafireen)?" [29:68]
But ofcourse, there are conditions to be met - such as, the actual
rejection of which itself constitutes kufr, and there is no confusion in the mind of the ignorant person or who is misinterpretting the sharee'ah. And as you stated, in such cases takfeer is performed by one who is able to do so, i.e. a person of knowledge.
Ibn Taymiyyah states: "Whoever's Islaam was affirmed with certainty, than it cannot be removed from him with doubt. Rather, his Islaam will never cease until after the proof has been established against him and any doubt [concerning his case] has been removed." - Majmoo' al-Fataawa (12/467)
Here is a nice article on the principles of takfeer.