People throw rumors around that Putin could have material for blackmail on him RE Golden Shower tapes and business dealings with Russian Oligarchs.
Another, simpler theory is that since he also throws compliments toward other Dictators as well as Putin is that he just admires their ability to do what they want.
Trump is a narcissist and not that smart, so I think he largely just wants to be like other powerful people.
It's almost guaranteed that Putin has material for blackmail on pretty much every world leader, if it exists, because Russia's intelligence operations are top notch. I'm guessing he holds his cards close.
I'm guessing Trump and Putin have a history as well, it's just not clear what exactly that history is.