Restore a component that was deleted from a project? EG: /apps/yoursite/components/componentA. If so, as @Veena_Vikram says, you need to roll-back to a previous version of your applicative code. You can do this by either:
Reverting to a previous version of your application code. If your code is not in version control then... I don't know what to say.
Re-installing the last application package via CRX Package Manager
Restore a component that was deleted from a page? EG: /content/yoursite/home/jcr:content/componentB. If so, then you have a few options (depending on the scenario):
If the new (wrong) content has not yet been published, you can retrieve it from the publisher(s) by creating a package on the Publisher and installing it on the Author environment.
If you make use of AEM OOTB versioning system, you can simply revert to a previous version (see this documentation)
If you have a content export system towards lower environment (eg: your PROD content is exported every day such that your UAT/Staging content is always at n-1 days behind PROD) you can retrieve it from the lower environments with the packaging method mentioned above.
If your content was overwritten by a package install, you can un-install the package via CRX Package Manager (see this documentation).