Official Documentation on 2nd and follow on loans wiped out if I bu first lien on auntion

Hi, I am reading on forum that if I buy a home on aution that is on sale for first loan recovery then the follow loans are wiped out.
But if i buy the Notice of sale listed by second lien-then I owe first lien - its not wipred out
Did i understood above correctly.
Is there any official website/documentation to verify above that i can read more and understand deeply. Sorry I am an aerospace engineer and we ask for written documentation on any advice/suggestion- hope you don’t mind, I want to dig deeper into it.

Mark Skilling the COO of ForeclosureRadar recently wrote:
The priority of a lien in relation to other liens on the same property is governed by the conventional lien priority rule of Civil Code Section 2897, namely, that it is determined by the time of its creation. Section 2897 states:
“Other things being equal, different liens upon the same property have priority according to the time of their creation…” In addition, Section 2898(a) provides: “A mortgage or deed of trust given for the price of real property, at the time of its conveyance, has priority over all other liens created against the purchaser, subject to the operation of the recording laws.”