Life is lived from the heart (Proverbs 4). If my heart is in something, it will show; but if it's not, that often shows as well.
What if my heart is into something that isn't right? What if I regard iniquity, or cherish sin in my heart, so that as the psalmist tells us, the Lord will not hear my prayers? Of course when we recognize the sin, then we simply need to confess it as such before God, whether we still cherish that sin in our heart (likely we will) or not. We need to be those who do not excuse sin, and indeed are working on it, through Christ. And I often find that as I do I end up wanting to turn my back on that sin, not that I can't gravitate back towards it again.
A big part of what we're to do here, I believe, is training ourselves (first us, but in a way, each other?) to be godly, as Paul writes to Timothy. I think in these cases we do what Paul mentioned elsewhere: he beat his body black and blue (I take that metaphorically) and made it his slave, so that he would not end up losing out on the prize the Lord wants to give to all of us, his children, in the end.
I take all this to mean that when my heart is wrong, I don't let my body follow suit, and I repent when I do wrong. But training oneself to be godly would include directing our bodies, and hence ourselves and our hearts toward God and his will, setting our minds and our hearts on heavenly things, not on fallen earthly things as Paul tells us in Colossians.
Realize this is training. Does training change one overnight? No. That is why we have to keep at it, day after day, week after week, month after month, even year after year, so that over the long haul we'll really change in ways that please God. In the short haul we'll have moments, seasons and days that seem especially difficult or when we may fail. But we need to hang in there in such training for the long haul.
Obedience attempted from the heart by grace is a big part of this training to be godly, while we keep at the basics of Scripture reading, prayer, and engagement in the community of God in Jesus unto mission. And of course this involves no excuse of any wrong, no matter how justified it may seem to us. Sometimes we need to turn those wrongs into creative endeavors to do God's will in regard to whatever the issue may be.
What thoughts might you have on training to be godly? I'm working on this.