Correct me if I'm wrong, but literacy among medieval Catholic peasants would have been very low. However, the Catholic Church did make an effort to keep records of births, deaths and marriages.
Would the Catholic Church have divulged this information to a peasant who wants to know if the woman he wants to marry is his first/second cousin, etc.? Or would their records have not been clear enough?
Do we have historical accounts of peasants marrying first/second cousins out of ignorance? Do we have accounts of medieval peasants being encourage to move villages to avoid inbreeding?
So in the first place, the thing to remember is that parish churches didn't keep registers of things like baptisms, marriages, etc. until early modern times. So how would the community know about these things? Memory and oral knowledge. And that was considered perfectly fine and reliable.
So, for example, when someone was carrying out an investigation, they'd gather the "oath worthy" people of a community, that is, people whose word could be trusted, and question them to find out what went down. You see the use of memory and oath in something like Domesday Book in England, a massive survey of most landholdings in the kingdom, in which oath-worthy men were gathered from each town, manor, etc. to testify what the worth, productivity, and ownership of land had been like in the reign of Edward the Confessor, shortly after the Norman Conquest, and in 1086.
What does this have to do with marriage? Well, from the Fourth Lateran Council of 1215, marriage was forbidden within four degrees (i.e., first cousins and closer). You can tell that this was pretty well carried out, because one thing you see in lots of parish priests' books at the time is genealogical diagrams to show what the permitted degrees of consanguinity are. But remember, noble families might keep written genealogies, but your peasants aren't going to. Rather, they rely on memory and oral knowledge.
And now I bring up two practices in traditional English-language marriage. (I'll need someone else to comment on how it went down on the Continent.) The first is the reading of the banns of marriage. You see, the Fourth Lateran Council -- There it is again! -- required that when a couple was planning on marrying, the priest would need to declare in public (usually from the pulpit) the people getting married and to admonish anyone who knew if they were within the forbidden degrees of marriage (or had other canonical impediments, such as the bride and groom to be being godfather and godmother of the same child) to come forward and make it known.
And that brings us to the famous words of the Book of Common Prayer: "If any of you can show just cause why they may not lawfully be married, speak now; or else for ever hold your peace." That doesn't mean to pipe up that he's a dirtbag and will only make her miserable for life. No, what it is is asking if there's any canon-legal impediment to their contracting a valid marriage. Are they siblings or first cousins? Is the man impotent? Are they godfather and godmother of the same child? And so on.
So to answer your question, they relied on the memory and oral knowledge of the community to know whether or not people were within the forbidden degrees of consanguinity.
Does that make sense?
/u/Herissony_DSCH5 has previously answered How much trust can we place into medieval church documents?
/u/sunagainstgold has previously written about how medieval records influence historians' understanding of how people in those times thought and includes family trees as an example.
These are places to start, not final destinations.