1). A simple electromagnet consisting of a coil of wire wrapped around an iron core. A core of ferromagnetic material like iron serves to increase the magnetic field created. The strength of magnetic field generated is proportional to the amount of current through the winding.
2). There are a many ways to produce electricity. Electrons can flow between certain different materials providing a current, as in a common battery. While reliable and portable, chemical batteries run down quickly. To provide the large amounts of steady power demanded by modern societies, large power plants have been built. Most power plants make electricity with a machine called a generator.
Number 2 is maybe correct but number 1 is correct