This is the basic schematic diagram with D1 going to a 330 ohm resistor
the other end of the resistor goes to the anode (positive) side of the LED
the cathode (negative) side of the LED goes to ground.