The Gemara draws a distinction between the status of a Mamzer and that of a Halal. A Mamzer is a child of a forbidden union, such as if a married woman had an adulterous relationship. The child from this union has the permanent status of Mamzer, which forbids him or her from marrying (though a Mamzer and a Mamzeret may marry one another). The term "Halal" refers to the product of a union between a Kohen and a woman forbidden only to Kohanim. For example, if a Kohen marries a divorcee, in violation of the Torah prohibition forbidding Kohanim from marrying divorcees, the product of this marriage is called a Halal, or a Halala in the case of a girl. A Halal is not considered a Kohen, even though his father is a Kohen and his last name is "Cohen." And a Halala may not marry a Kohen, even though her father is a Kohen, since she was born from a relationship that violated the laws of the Kohanim. Unlike a Mamzeret, however, she may marry non-Kohanim.
The Gemara states that "Jews recognize the Mamzerim among them, but do not recognize the Halalim among them." This means that the phenomenon of Mamzer is generally widely publicized, and when there is a Mamzer, people know about it. Therefore, when two people decide to get married, it is not necessary for each to do thorough investigations to ensure that the other is not a Mamzer or Mamzeret. The status of Mamzerut is well-known, and therefore in the absence of any particular reason to suspect that somebody has this status, there is no need to thoroughly investigate a potential spouse’s family background to check for "Mamzerut."
The status of "Halalut," however, is not widely known. People are not necessarily aware when a Kohen marries somebody forbidden for Kohanim, and it is therefore possible for a person to be a Halal or Halala without this being public knowledge. Therefore, we cannot automatically trust a person who says that he is a Kohen. Of course, if one comes from a family that is well-established as proper Kohanim, then we certainly treat him as a Kohen. But if a person comes from out of town, and nobody in the community knows him, we cannot automatically accept his claim that he is a Kohen. The Shulhan Aruch rules that the individual in such a case should not be given the first Aliya and should not recite Birkat Kohanim – and certainly would not be given Teruma in the days when Kohanim received Teruma – until his background is investigated and he is determined to be a proper Kohen. Since the status of "Halalut" is not widely publicized, a person’s claim to be a proper Kohen cannot be accepted without some research into his background.
The Rama (Rabbi Moshe Isserles of Cracow, Poland, 1525-1572) disagrees with this ruling, and claims that nowadays, we can accept a person’s claim that he is a Kohen and call him to the Torah as a Kohen. From the Shulhan Aruch, however, as mentioned, it emerges that we cannot trust a person’s claim even with respect to the Aliya to the Torah. Therefore, if a person moves into the community and claims to be a Kohen, his background should be checked before he is treated as a Kohen.
Summary: If a person comes from out of town and says he is a Kohen, he should not be treated as a Kohen – with respect to Aliyot and Birkat Kohanim – until some research is done to ascertain that he is, indeed, a proper Kohen.