The CTO is the chief engineer he or she sets technical direction for the company. VP of Engineering is the top manager for that division and executes the CEO’s vision using technical choices made by the CTO.
In many companies these are the same person, but not always. In my last startup they were separate people. The best chief engineer (CTO) isn’t always a good people person (VP).
Software companies that differentiate by some metric other than core technology might not need a CTO, which would explain your confusion if that’s your background.