An individual LED will only light with a low voltage and the current in one direction. For white LEDs the voltage is about 3 V, but it's the current that should be controlled, not the voltage. LEDs should not be connected to a large reverse voltage or they will be damaged. If they are connected to a forward voltage that is mor than their normal voltage, a large current will flow and they will burn out.
The circuit you show has a capacitor in series. Each time the mains goes positive, it will charge up on way, and it will charge the other way when the mains goes negative. Because the mains is a smooth waveform, the voltage only rises or falls relatively slowly, taking 8.33 ms to go from fully positive to fully negative or vice versa, and there are no sudden changes, so the current to charge or discharge the capacitor is small. The size of the capacitor and the frequency and voltage of the mains are what limit the current.
It's a bit like a tidal estuary filling up and emptying each tide. The flow of water in and out of the mouth of the estuary depends on how high the tides are, and how often, and the area of the estuary.
The design is based on a certain mains voltage and frequency, so 120 V and 60 Hz in the USA, which won't change much, so the size of the capacitor can be chosen to give the required LED current. The LEDs are supplied from the mains without there being any actual voltage conversion. The overall LED voltage, probably around 36 V in the case of your circuit, it too small to effect the current much.
The 1 kOhm resistor is to limit the current at turn on, when the voltage can change quickly. Without the resistor the current would be very large for a few microseconds, which could do a lot of damage.
I don't think that the LEDs in your first picture used that circuit exactly, because the panel is marked with a "+" and a "-" sign. It could be that it is a similar circuit, with a bridge rectifier, in which case the current will still be controlled by a capacitor. However it could also be a completely different design of circuit.