I recently saw in person SU-27 belonging to the Ukrainian Air Force. I spotted some protruding elements from its tail and I'm wondering what are they called and what do they do?
I believe that these are static discharge wicks. You can see similarly sized/shaped wicks on a 1/32 scale models of the SU-27, as discussed here, but, more importantly, you can find them labeled with number 53 on the cutaway drawing below. The label is written as Разрядники статического злектричества, which, according to Google Translate, is "ESD arrestor" (or static discharge wick).
These are distinct from the shape of the wicks found on most GA aircraft in the US (just a straight stub of wire, potentially with some insulation around the base), but, as discussed on Aerospaceweb, the shaping of the wick (particularly the inverted cone shape shown here) contributes to increasing the gradient in the electric field from tip to base of the wick. This encourages accumulated charge to migrate back into the atmosphere from a controlled point and decreases interference with on-board electronics and radio systems.