What was the purpose of a saint in a medieval church?

A saint in the Catholic church is one who led a specifically important life in dedication to God or the Church, that they were perceived to have more direct influence on the affiars of mankind after death (one of the requirements for saints is that they must perform 3 miracles after their death). Thus, they were frequently "assigned" to protect various things: specific buildings, a specific career, group of people, or what have you.