The context in 1 Peter is that of persecution and suffering for the name of Christ during our sojourn on this earth. Suffering is a training tool that God uses, like the blast furnace used by a refiner of fine metals, to purify and develop our faith. This is a humbling process in that it causes us to live more and more in dependence on God. For the refining concept, note 1 Peter 1:6-9.
6 This brings you great joy, although you may have to suffer for a short time in various trials. 7 Such trials show the proven character of your faith, which is much more valuable than gold—gold that is tested by fire, even though it is passing away—and will bring praise and glory and honor when Jesus Christ is revealed. 8 You have not seen him, but you love him. You do not see him now but you believe in him, and so you rejoice with an indescribable and glorious joy, 9 because you are attaining the goal of your faith—the salvation of your souls.
1 Peter 1:6-9.