(Electro)Magnetism is one of the forces of the universe, such as what may be more familiar to you; gravity.
Typically magnets are made of Iron, or magnesium. An object may be magnetic for multiple different reasons, such as how magnesium is paramagnetic. This means their electrons have a sort of spin to them. Metals such as nickel and cobalt attract to them.
However, as you will learn with electromagnetism, electric currents produce a magnetic field.