Trust relationship between this workstation and the primary domain failed

This often happens when your computer password is “Out of Sync” between the computer and the domain controller and its reset after some times (30 days).

Here are ways to fix this issues.

Method 1:
Try resetting the password of the computer, on your DC (Active Directory Users and Computers) and try again. Most times this fix does not work.

locate the machine (isolate it by removing the network cables, and turning off the Wireless etc, so it has no network connections) and login as an administrator.
click on start, on the search or run box option type the following command,
sysdm.cpl and press enter.

On the Computer Name tab
Click on Change and select the workgroup option, and type in TEMP and press OK.
Note: This involves you leaving you domain, but if this is the case use the Netdom option (method 2)to fix it and reboot.
logon to the Domain Controller and locate the computer object that is having problems and delete it.

Rerun sysdm.cpl again and re-join it to your domain again and supply the domain user acccount name.
Method 2:
This Method is a good fix as leaving the Domain is usaully not recommended. Ensure to remove all network cables and turn off the Wireless as well.

Type this command below on windows command prompt
netdom.exe resetpwd /s:{domain controller name} /ud:{username} /pd:*