would be my answer.
This isn't school where teachers give you trick questions and you fail if you misunderstand it. If you are applying as a software developer and you can't talk at length about various forms of interfaces you are probably not very experienced. UI, API, ABI are all interfaces..
After I went through my experience with Java, C#, python, etc. he said, “I meant like… Spanish…”
Because even of you were thinking about spoken languages, what does "knowing" mean? I "know" Hungarian exists, I know how Hungarian sounds like, I know how Hungarian words look like, but that doesn't mean I speak or understand it. Now if it was clear they meant apoken languages we could infer from the context they want to know about our skills with different spoken languages and didn't read our CV, which at least where I am from always contains a languages level with a skill level (e.g. German A1, English B1)
So yeah interviewers can suck at their job.
Please explain leetcode live sessions, random brain teasers (how many pinball balls blah blah blah), weird off-the-wall questions (you were just in a plane crash/you wake up as a cockroach), AI trivia screeners, and the rest?
My approach to interviewing is that I want candidates to do the best they possibly can.
As a matter of fact, yes, that's the best approach, but only because if you receive a question like the OP's, you've already lost and have to just take a blind bet.
Now if a terse question deserves a terse answer that's to be judged on a case by case basis, I suppose.
But I keep an open mind, and am always ready to be pleasantly surprised.
Depending on how recently I'd been working on our printer drivers I also would likely need clarification. Now if the job is "frontend developer" I agree, someone needing to clarify if you're talking about a user interface or communication layer interface is probably a bad sign.
But if it's a looser role I'd definitely look to clarify the question!
I guess you could just give a generic answer: an interface represents some kinda boundary between users and implementation details, and hopefully said boundary is easier to use than the details.
I would guess some would flag that as a bullshit answer, but without clarification you can't do anything but speak in generalities.
Now if it were the interface keyword, they're primarily a means by which to introduce polymorphism. They no more achieve the goal of a generally-defined interface than does a regular class, which already satisfies the definition of the generally-defined interface through their public methods. This might also sound like a load of bullshit to some.
It isn't an easy question, but I'd really suggest to see such broad questions as a chance to show off your knowledge, instead of a potential trick question where the teacher expects you to read their mind and gives you an F if you answered the wrong question. If an interviewer isn't happy with a broad answer to a broad question they can always ask you to go into detail on a specific aspect. Having demonstrated that you have a broad overview and a high level understanding is valuable either way.
"What is an interface?", is a totally legit question that can be answered without thinking about any specific interface. E.g. it could could be described as a systemic boundary between two domains, that is ideally well defined. You could talk about different interfaces, what the advantages and pitfalls of introducing interfaces are, conventions that exist etc.
In my experience, outlining one or a few things you call interfaces would be a much better display of both knowledge and attitude: GUI, API, interface keyword or concept in some programming language, etc. Even better, add a quick description of what they all have in common ("broadly speaking, a way to access a set of functionality" or something like that).
And THEN you may ask "would you like me to elaborate on one meaning in particular?"