In a sense, yes. The Earth is composed of layers having different chemical compositions and different physical properties. The crust of the Earth has some permanent magnetization, and the Earth’s core generates its own magnetic field, sustaining the main part of the field we measure at the surface. So we could say that the Earth is, therefore, a "magnet."
But permanent magnetization cannot occur at temperatures above about 650 degrees Celsius (1,200 degrees Fahrenheit), when the thermal motion of atoms becomes too vigorous to maintain the ordered orientations needed for permanent magnetization. The core of the Earth has a temperature of several thousand degrees Celsius, and is not permanently magnetized.