Box representation in modern languages
I'm not sure I completely understand your questions. Still:


  who deals with the size of the block?


If the compiler does not know the size, it can write the size at the very beginning the block, after (or before) the tag. Some convention must be established -- this is something that must be decided when designing the runtime system.


  who decides the type of the tag? I'm pretty sure it is the runtime system who has to deal with it.


If the type is known by the compiler, the compiler can emit code to put the right tag. Otherwise, the compiler must emit code which will compute the tag at runtime, e.g. fetching it from some other block, and store it at the start of the block.


  But then what is done in compile time? How does a compiler represent objects at compile time?


It does not have to. A compiler must emit target code which, at runtime, will deal with the tags.

Further, note that tags are not always needed. If the language is (statically) typed, the compiler might know the size and type of everything, hence there would be no need to store tags at runtime.