LEDs have 2 leads. A Anode which is possitive and a Cathode which is Negative.
When you buy an LED look at the package for orientation.
When using a Battery the Positive side or the RED wire goes to the Shortest lead.(In most cases) The Negative or Black wire goes to the lLongest lead.
Usually the is a Resistor in series with the LED to protect it from too much current.
If you use a pulse to the LED this is not necessary.