In Exodus 12, God commands the Israelites to keep the first Passover in preparation for the final plague (the death of firstborn males) and the Exodus from Egypt. As part of the Passover preparation, God tells Moses and Aaron to instruct the Israelites to paint blood from their Passover lambs on to the frames of their doors. Painting blood onto their door frames signified their faith in God's warning and marked them out from the pagan Egyptians; when the Angel of Death passed through Egypt he would pass over the doors marked with blood (hence the name, "Passover") without killing the firstborn males who lived within those houses. As Presbyterian minister Matthew Henry explained in his famous Bible commentary, this action had greater significance:
The blood of sprinkling is the saint’s security in times of common calamity; it is this that marks them for God, pacifies conscience, and gives them boldness of access to the throne of grace, and so becomes a wall of protection round them and a wall of partition between them and the children of this world.
One can also see allusions to many other biblical events, perhaps most notably the death of Christ (he is frequently referred to as the "Lamb" in Scripture).