Microsoft has released a Windows Update troubleshooting tool. It is applicable for Windows 7,8.1 and 10. If you are using Windows 8, you need to upgrade to Windows 8.1 because Windows 8 is no longer supported.
This guided walk-through provides steps to fix problems when installing updates. Here are some commonly seen error codes: 0x80073712, 0x800705B4, 0x80004005, 0x8024402F, 0x80070002, 0x80070643, 0x80070003, 0x8024200B, 0x80070422, 0x80070020. These steps should help with all errors and not just the ones listed.