Choose which hat you want to replace and extract the models and materials folders to your \team fortress 2\tf\ folder, usually located in

C:\Program Files\Steam\steamapps\yoursteamusername\team fortress 2\tf\