The interviewer will set different types of test cases to test your defined logic and produce the output. If your output matches exactly with the expected output, then your test case will be a pass. Fail otherwise. The number of test cases depends on the difficulty of your question, and these test cases will be executed automatically when you run your code.
To understand how the test cases work, refer to the Test Cases in your Coding Question article.