How can I solder a wire onto a piece of metal?
Soldering electrical connections is not difficult but there a couple of things you need to know.

First, you need a soldering iron that gets hot enough (but not too hot) for the conductor you are trying to solder. You also need to use a resin solder (not the same solder you'd use for plumbing).  All of the surfaces need to be clean; if there is any oxidation it will not "stick". You can clean copper surfaces with steel wool.

If you're using a new soldering iron, you have to tin the tip. To do this, heat up the soldering iron and touch the solder to the tip of the iron so that you cover the tip in a thin layer of solder. Wipe the excess off with a damp paper towel or sponge.

Now, heat both the conductor you are trying to solder and the pad you are trying to solder to.  When it is hot enough, touching the solder to the pad (don't touch it to the iron) should cause the solder to melt and flow into the connection. If it doesn't, it's not hot enough. Once the solder is sucked into the connection, remove the soldering iron and let the connection cool. You should be able to pull the wire with a bit of force. If it pulls away easily, you have a bad solder and will need to try again.