The chemical reactions and pathways involving terpenoids, any member of a class of compounds characterized by an isoprenoid chemical structure and including derivatives with various functional groups.