Just want to increase my knowledge and for best practices.

I think I know what an interface is. But can someone explain to me, with a reasonable example too (And code snips) on:

What is an interface? how would you implement one in your app? Why would you want to do this?

What is inheritance? how would you implement this in your app? Why do you want to do this?

Would very much appreciate it!