In a parliamentary system, the function of ministers is to act as the head of various departments, or ministries, of the executive part of the government.
The executive branch of a government is typically divided into various departments or ministries such as the Ministry of Defence or the Ministry of Education. Each of these is in charge of carrying out government policy in its particular area.
A minister's function, then, is to act as the head of that ministry. The minister typically helps to form government policy in his or her area and then tries to manage the ministry in such a way that these policies are carried out effectively.