Translation:He is not going into the house but to the castle.
I think that "go into the house" is a little more correct than "go in the house", but the latter is still OK. "Into the house" means that you are entering the house. This corresponds to using the accusative case in German, "in das Haus". "In the house" usually means that you are doing something in the house without entering or leaving it. This corresponds to using the dative case in German, "im Haus".
Should both the "Haus" and "Schloss" elements be in the accusative, since he is in the motion of entering both? If so, why is it "zum Schloss", in dative?
Is there available on the internet a deep study on german grammar talking about which are the cases (nominative, dative, accusative, genitive) of each part of a sentence?? (And word order as well)
I'm a bit confused here. Why not in dem Haus? (please notice that I need answers for all cases, or at least the very most of them, not just this single one)
If you want answers for all cases, you are going to have to get a German grammar reference. I don't know about internet sources, but there are some good books such as "Hammer's German grammar".
The general rule which helps with this particular sentence (and many others) is that for prepositions referring to spatial relationships, you use the accusative case when there is relative motion between the subject and the object, and you use the dative case when there is no relative motion between the subject and the object. (Sometimes it is not clear whether there is relative motion or not, and you have to learn by example which case to use.)
These are "two-way" prepositions which can be either akkusativ oder dativ.
According to the site below, a good way to remember is MOTION = ACCUSATIVE and LOCATION = DATIVE.
This is a great resource on prepositions (and all other Deutsche Grammatik): http://www.lsa.umich.edu/german/hmr/Grammatik/Praepositionen/Prepositions.html