If you're talking about a hard inquiry that happens when you apply for a loan or apply for a credit card then the hard inquiry should be removed from your credit report within a month and sometimes sooner.
You score might drop a few points and then go back up to where it was before.