Boiling Oil is a technology in Age of Empires II: The Forgotten that is unique to the Persians and can be researched at the Castle. Once researched, it gives Castles +9 attack against rams (effectively resulting in 6-8 additional damage, depending on the type of ram). It only affects the first arrow; all additional ones only do the minimum damage of 1.
As buildings, Castles are weak against siege units like Rams, who have an immense attack bonus against buildings. Boiling Oil enables Persian Castles to defend slightly better against them, though any more than one Ram still requires the attention of melee units. Bombard Cannons and Trebuchets of course still outrange Castles and remain a heavy threat, but unpacked Trebuchets do get the bonus damage from Boiling Oil. University upgrades should be researched to increase the efficiency, especially Murder Holes since without it, as soon as the Rams get beneath the Castle, Boiling Oil becomes useless. Blacksmith upgrades also add range to the Castle and should be researched, as they increase the time to apply the extra damage.