The difference is really all in how the loans were originated. A
junior mortgage refers to the lien placement on the property title.
A second mortgage means a mortgagor has more than one loan on a
property with the same lender.
For example, If I purchase a home (assuming the title is clean
and there are no liens on the title) and get the loan with ABC Bank
then ABC Bank is considered the senior mortgage. If I obtain
another loan with ABC Bank most commonly a HELOC or Home Equity
Line of Credit then it is a second mortgage in second position.
Let's say that after I obtained the second loan with ABC Bank, I
chose to take out a smaller loan against the property with XYZ
Bank. That loan will be considered a junior lien.
The loans won't always fall that clean on the title however. You
can have a junior lien between a senior lien and second mortgage.
In the example above if the XYZ Bank loan was taken out before the
second mortgage with ABC Bank then it would still be called a
junior lien and the second mortgage with ABC Bank would be the
second mortgage with ABC Bank but in third position.
Hope that helps!