I'm interested in how does dynamic typing in Objective-C work. I've been studying the "id" type, I know what it does and how to use it, but I'm curious... How does such functionality get implemented under the hood?

You cannot determine/resolve anything during compile time, only during runtime. I guess it can simply just point to the first byte of some object in memory, but how is the class signature stored? How does it know what is it currently pointing towards and how does it implement various getters for the class of the pointed object?