How do I close off attic vents?
The answer is "don't do that!" The vents you're seeing are ridge vents on top and a soffit vent on the bottom.

Attics need ventilation, these openings are by design and critical to avoiding serious roof damage. If you close them off, your attic will overheat in the summer, and cause ice dams and water damage if it snows. Newer vents include screens that will prevent pests from getting into the home. And you can also install baffles if you need to insulate into the rafters rather than the joists, but insulating the joists is preferable.

Here's a nice blog post about roof ventilation that will give you more details.