Lodestones are made up of the mineral magnetite, and are a form of naturally-occurring magnets. As magnets, they are capable of attracting iron. It was because of lodestones that magnetism was originally discovered. Those magnetic properties allowed them to be hung from a cord so that the lodestone could spin and turn, creating the first crude magnetic compass. Indeed, the name lodestone, when translated from Middle English, can mean "course stone" or "leading stone". It is also one of the only minerals that can be found in a naturally magnetized state.
Exactly how lodestones become magnetized is a question that is up for debate. Because the Earth has a magnetic field of only 0.5 gauss, it is not strong enough to magnetize a lodestone without help. At the moment, the prevailing theory is that the strong magnetic fields which surround lightning bolts are responsible for magnetizing the lodestone. That lodestone is typically found near the surface of the Earth, instead of deep within it, helps to support that theory.