Task hijacking is a vulnerability in Android apps caused by misconfigured Task Control features in their AndroidManifest.xml. This allows attackers to take over legitimate apps, steal user data, and carry out various attacks, such as listening to the user through the microphone. Preventing it involves creating self-defending Android apps using security measures like those offered by Appsealing.