An understanding is an informal agreement made between two or more people. Typically, it refers to an agreement that has not been written down and may not have even been announced.
Ex: My roommate and I have an understanding that I take out the trash every week for a month, and then it's her turn to do it every week the following month.
The expressions reach an understanding and come to an understanding refer to the act of making an agreement with someone.
Ex: After months of arguing about where their kids should live after they got divorced, Rebecca and Neal finally reached an understanding and they will be sharing custody.
A consensus is a general agreement, usually among many people. It can also refer to an opinion that is shared by many people.
Ex: There is a lack of consensus among the board members about whether the company should expand into the Asian market or not.
To reach or come to a consensus is a synonym for to come to an agreement.
Ex: The judge had to declare a mistrial after he learned that the jury could not come to a consensus on a verdict. Half believed that the defendant was innocent, and half was convinced that he was guilty.
Ex: The doctors were unable to reach a consensus on the best strategy for responding to a flu pandemic, but all agreed that the public needed to be better educated on how to prevent the illness.