Second Mortgage vs HELOC

Hello, I am wondering what are the pros and cons for each and which one would be better to use in what scenario’s. Im debating if to use a HELOC or a 2nd mortgage to use my home equity. I would like to not only use the equity for my next property but at the same time use some of it to consolidate some debt. What are your thoughts? Thank you!