It is a trustworthy statement: For if we died with Him, we will also live with Him; If we endure, we will also reign with Him; If we deny Him, He also will deny us; If we are faithless, He remains faithful, for He cannot deny Himself.
This verse is used occasionally to argue against eternal security, with the focus being on "If we deny Him, He will also deny us." But first, notice that Paul hasn't specified what He will deny us. That part's a little ambiguous. And then notice what follows… "If we are faithless, He remains faithful for He cannot deny himself." Christ remains faithful to His promise to us even if we are faithless.
Another key to this is the various "ifs" in this passage. In the Greek language there are different words for "if" and the different words mean slightly different things. In this passage, every "if" is the Greek word "ei" which is known as a "first-class condition" which means essentially "If, and it's assumed to be true." There is also a second-class condition, which means "If and it's assumed to be false" and a third-class condition which means "if, maybe yes and maybe no." But this first-class condition is important because it reveals that Paul expects his audience to become faithless at some point or even to deny Christ. He's fairly certain that they will… and of course he's not advocating that they become faithless, he's just recognizing that they will at some point. Now if Paul is threatening believers with the loss of their salvation in the event that they lose their faith, then why would he use the first-class condition? If that's what Paul's talking about--losing salvation--then we will lose our salvation because we will deny Him at some point. And if this is so, then we may as well all give up, 'cuz our goose is already cooked.
A better way to understand this in light of these conditional "ifs" is that the thing which will be denied is rewards in Heaven. That is consistent with other writings of Paul also, and for Paul to say we could lose our salvation--under any circumstances--would be inconsistent with other things he wrote.
Another idea is that Paul is for a moment speaking about an unbeliever who denies Christ, in which case Christ denies the unbeliever. But this seems less likely because of the first-class condition "if", but I'm not quite sure that rules it out entirely. I think that the denial of rewards makes the most sense, because the book of 2 Timothy was written to people who were already saved… not unbelievers.