Heavy quark physics from lattice QCD