Kontsevich formality theorem and applications to Lie theory and complex geometry