Help with connecting LED's

How do you connect several LED's to the Arduino? (Program wise)

You asked how to connect hardware (LEDs) to software (program). That doesn't make sense.

Maybe trying explaining more about what you are trying to do.

Connecting LED's to digital pins.

Connect 2.7k resistor to digital out pin - connect LED anode to resistor - connect LED cathode to arduino ground. Do that for as many LEDs you have or the number of output output pins (whichever is the lesser)

There are ways of using very many more lEDs but let's learn to crawl first !

More along the lines of...

define LED 9

Would you just do that for every pin that controls an LED?

pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
etc.

that defines pin 9 (etc) as an output, which also has the effect of enabling the internal pullup resistance on the pin. If you forget to do this, you will get much less current on the pin than you might expect…

Also, remember that you really don’t want to pull a whole lot of current from the pins, so if you are lighting more than a couple of standard LED’s, or using high-power (high-current) LED’s, then you are going to want to use an external transistor to switch the power rather than sourcing it from the chip/arduino directly

that defines pin 9 (etc) as an output, which also has the effect of enabling the internal pullup resistance on the pin. If you forget to do this, you will get much less current on the pin than you might expect…

Declaring the pin as OUTPUT disables the internal pullup resistor. Lower resistance = higher current = brighter LEDs.