From a practical standpoint, there is no significant difference between mortgages. The terms 1st Mortgage and 2nd Mortgage describe when the physical mortgage document was recorded in the County Recorder’s office.
When a mortgage document is entered into the county records and there are no other outstanding/unpaid mortgages in the country records, this is called a 1st Mortgage.
Subsequent mortgages generated after this are called 2nd and 3rd mortgages, etc.
If a property is foreclosed on, then the 1st mortgage gets paid off first. Any funds that are left over are then applied toward the other mortgage(s) on file, such as a 2nd mortgage.