The Skeleton Archer is a Hardmodeenemy that sometimes spawns in the Cavernlayer. They move fairly slow compared to other cave enemies. When the player is in their line of sight, they will stop moving and shoot Flaming Arrows at the player, which have a chance of inflicting the On Fire!debuff.
Several simple pit traps (7 blocks deep) can be very effective against such enemies as Skeleton Archers and Armored Skeletons.
Skeleton Archers rarely shoot the first arrow accurately, slowly adjusting aim, so moving around makes it almost impossible for them to hit you, as does standing above.
There is a small delay before the first arrow is shot, during which the Skeleton Archer is vulnerable to attack. If a player lands a hit it will interrupt its aiming, so a quick player can prevent it from firing a single shot.