What's the difference between tax profiles and tax codes?

Tax profiles are used to define tax rates used when invoicing clients. Whereas, tax codes are used to apply taxes to expense amounts.