Hi Monika Jain,
Scenario1: Since it is an asynchronous plugin, it allows triggering event to finish before the plug-in code runs. So the account will be created and contact will not get created if an error occurs while contact creation. The account record will be present in DB.
Asynchronous plug-ins are executed by asynchronous service. Asynchronous plug-ins allow triggering event to finish before the plug-in code runs. Therefore these can never be used to prevent an action, validate data entry, or provide any error messages back to the user.
Scenario2: Since it is synchronous plugin, triggering event will wait until the plug-in finishes the execution. So the error in plugin code while contact record creation will not create the account record too. The account record will not be present in DB.
Synchronous plug-ins are executed by the CRM Core System. Synchronous execution means that triggering event will wait until the plug-in finishes the execution. For example, if we have the synchronous plug-in that triggers on the creation of account and user creates account record in CRM, the form will hang at saving until the plugin has finished.