To underline something can be to literally mark a line under it, or it can be used figuratively as a way to stress or emphasize a point.
To underlie something is to literally be under it, or the term can be used figuratively as the cause of something or the source of it. This is most commonly found in the present participle form of underlying, as in the underlying cause.
Side note: The past tense of underlie is underlay and the past participle is underlain.
Examples
“If you underlined words, there also was a pop-up glossary and a protractor and calculator for the math part,” Kuehnle said. [Chicago Tribune]
The big-top tatters of Rebekka Duffy’s set may warmly underline Adlum’s nostalgia, which is really for the escapism of performance lifting small-town horizons: “I deal in magic; the real thing,” says Kerrigan, drilling up business. [The Irish Times]
The platform will underlie Apple’s HealthKit and REsearchKit applications; J&J will use it to create mobile apps that coach caregivers on pre-operative and post-operative procedures; and Medtronic will create a service for diabetes patients. [Fortune]
“The price gap between Hong Kong and Shanghai shares remains one of the biggest drivers behind the rally in Hong Kong,” said Alma Yang, a portfolio manager at Shenyin Wanguo Asset Management, adding that the pullback in China’s stock markets should be a normal phenomenon to address underlying risks after a hefty rally since the second half of last year. [South China Morning Post]
On the 150th anniversary of the surrender at Appomattox, it’s painfully clear that the issues that underlay and fueled the Civil War survived it. [Cognoscenti]
The island is underlain by sedimentary rocks, cut by still-active faults. [The Guardian]