If you borrow to invest the interest is generally deductible. Interest on your home loan isn't.
As Ausprop says, basic stuff. I would advise not to do anything further until you understand the importance of this simple concept. And don't worry, most don't understand it.