The role of a goalkeeper in hockey is to protect the goal and prevent the opposing team from scoring. This involves making saves, communicating with defenders, and directing the flow of play. Goalkeepers also play a key role in penalty corners, where they must defend against shots from the opposing team.