The short answer is that the Romans did not learn very much from the Pyrrhic elephants; they learned much more from a succession of battles with Carthage during the Punic Wars themselves.
Here's the long answer. Pyrrhus brought with him Indian elephants, no doubt obtained from the Seleucids (who had a virtual monopoly on Indian elephants by this time). At that battle, at Heraclea in 280 BCE, the Romans (probably) faced elephants for the first time. Certainly it was the first time in such numbers, in a pitched battle. The elephants were apparently pretty effective in this battle, as they caused the Roman cavalry to scatter, ultimately leading to a rout. In this battle, the elephants were used as a sort of reserve shock troop and were not (apparently) drawn up in the regular line of battle. I don't think we should necessarily put a lot of stock in the effect of the elephants in this battle -- routs often hinged on a sudden change in deployment in general, whether caused by cavalry sorties or elephants or space aliens or anything else.
We know that the Romans captured some of these Pyrrhic elephants and eventually paraded them at Rome, but I'm unable to pin down the source for that right now. I thought it was Polybius but I can't find it. Anyway, the next time the Romans faced elephants, they were the African variety, brought by Hanno to Agrigentum in Sicilia in 262 BCE. These were probably supplied to the Carthaginians by the Numidians, who at that time controlled the elephant feeding grounds in the forested foothills of the Atlas mountains. We have no idea how they were trained compared to their Seleucid Indian cousins, but at Agrigentum, Hanno seems to have deployed them in the regular battle line, for Polybius tells us that the Romans shattered the front line of the Carthaginians and drove them back "on the elephants and other forces behind them." More elephants were captured in this battle, and perhaps this gave the Romans a little more confidence in dealing with the large beasts.
Too much confidence. Seven years later, at Tunis, the Spartan general Xanthippus lead the Carthaginians in a sound defeat of the Romans under Regulus, this time utilizing elephants in the initial charge on the Roman center formation. This battle showed the Romans how effective elephants could be when used as a spearhead in an initial charge against massed infantry. (incidentally, heavily-armored cavalry would do much the same job on Roman infantry centuries later).
In 250 BCE, at Panormus (Palermo), the Carthaginian Hasdrubal would learn the limits of this strategy. Here, he attacked a fortified Roman position with elephants, with disastrous results. A rain of Roman missiles caused the elephants to panic and sow confusion among the Punic ranks. The Roman commander Metellus took advantage and charged into the ruckus, winning the battle and killing/capturing dozens and dozens of elephants. The captured were taken to Rome and paraded by Metellus in his triumph, then (eventually) killed in the Circus to delight the crowds (and perhaps demonstrate to all that elephants could be killed like any other Roman enemy).
Hannibal seems to have used his elephants mostly as a screen for his cavalry, in which role they were very effective. Horses are, by default, terrified of everything including ladybugs and their own shadows, and untrained horses on the battlefield were useless against elephants. How well Roman cavalry was trained varied from battle to battle, even within the same campaign, but over time the Roman commanders learned to how minimize the effects of the beasts both against cavalry and infantry.
At Zama in 202, Hannibal tried to use the elephants in an initial charge against the center, as Xanthippus had done at Tunis. Scipio, however, had apparently studied that battle, because he arrayed his infantry in a formation which included "lanes" leading to the rear. These he also peppered in light-armed velites to harass the elephants with missile weapons. When the elephants reached the Roman lines, harried by the javelins and a pre-planned blare of battle trumpets, they panicked. Some turned back towards the Carthaginian lines, while most of the rest chose the path of least resistance down the "lanes" into the Roman rear, where more velites and cavalry pelted them and drove them to the fringe. A lot of them were captured, and we hear about the Romans using African elephants (perhaps these from Zama) against the Macedonians. At Cynoscephalae in 198 BCE, the Romans sent elephants in a charge against the massed phalanx infantry of Philip to great success (one wonders how Philip had not learned how to deal with elephants from his Hellenistic ancestors?). Later, the Romans faced Indian elephants again at Magnesia in 190. Here, they stayed in reserve -- maybe the Romans knew they were no match for their better-trained Indian cousins? At any rate, the legions had no problem dealing with the elephants of Antiochus the Great here. Livy tells us that the legionnaire was adsuetus iam ab Africis bellis et vitare impetum belluae et ex transverso aut pilis incessere aut, si propius subire posset, gladio nervos incidere ("accustomed now, from experience in the African wars, both to avoid the rush of the beasts and either to assault them with javelins from the flanks or, if one was able to come closer, to cut at its tendons with a sword").
Finally, the Romans used both Indian elephants (captured from Antiochus) and African ones (sent from Massinissa in Numidia) at Pydna in 168, again with great success. This time, they seem to have been used to charge into the enemy line of battle after the legions had already weakened it and thrown it in to confusion, thus contributing to a general rout.
That was the last time the soldiers of that generation saw elephants (that I know of). Caesar's troops would see some on the Pompeian side at Thapsus, but they played no major role. None of Caesar's troops could have been alive to experience the previous iterations anyway. That was, essentially, the last time elephants were used in warfare in Europe. There are scattered references to Romans using them as show-pieces in triumphs, the Circus, or to dazzle barbarian tribes, but not in any organized military manner.