Basics on the theory of heights and its applications to certain diophantine problems