Polymorphism

I seen some many polymorphism example which explains the concept using virtual method and that i understood but there is some polymorphism example which explains concept using $cast ,for example how to explain polymorphism in systemverilog interview - Google Search
and that i didn’t understand well.
So can someone explain which is correct or how can i answer if someone ask me in interview?

In reply to Harshad:

Here are ones I suggest you look at:

https://verificationacademy.com/courses/systemverilog-oop-for-uvm-verification