What is the function of a closed heart valve and what is the difference between a stroke and a heart attack?

what is the function of a closed heart valve?

what is the difference between a stroke and a heart attack?

this is for a project at school Thx Thx!