Can Arduino Mega power led flicker candles?

So, one of you said resistor, I understand how that works. The other said transistor, which I don't understand. Could you elaborate please? Thanks a lot guys.