A hard credit check is usually done by a bank loan or credit loan company on its borrowers. These hard pulls occur when you apply for a new line of credit and affect your credit score because they are reported to credit bureaus. Lenders will ask for your credit report to view your borrowing history and credit score.
A hard credit check imprints itself on your credit report. Future inquirers will see on your credit report when a potential lender did a hard check on you in the past. So, in case you default on your loan that did a hard check, it will stay on your report for a long time.