Godliness has value for all things

Paul uses the phrase “Here is a trustworthy saying” repeatedly in his letters to Timothy and Titus to introduce truths that their congregations could depend on. In 1 Timothy 4:7-10 Paul encourages Timothy to train for godliness, for “godliness has value for all things, holding promise for both the present life and the life to come”. But what is godliness? Why should I train for it? And how?