A mortgage acts as a security to the lender against default. This means that if you take a loan and mortgage your house, then in case of default, the lender can sell your house and get their money back.
A first mortgage means that in the case of default, the lender will have first right to the proceeds of the sale.
A second mortgage means that in case of default, the lender will get repaid after the lender of the first mortgage has been paid off.
Since the security for the lender of the second mortgage is lesser than the first mortgage, the terms of a second mortgage are generally not as attractive as the terms of the first mortgage.
The amount of loan you can get on a second mortgage depends on the equity that you have in your home. Thus it depends on the current market price of your home and the amount of mortgage that you have already paid. A higher market price and equity will translate into better terms for you.