Corbels are not features of castles but are found in churches of the 12th and 13th centuries.
Norman architects knew that rainwater draining from a large roof down the stone walls of a building would be absorbed by the stones, leading to damp entering the building through the walls, and to prevent this the roofs were constructed to overhang the walls by quite some distance.
A series of corbels (supporting stones) would be placed along the top of the wall to support a projecting course which in turn supported the eaves of the roof, meaning that the runoff of water would be clear of the walls.
These corbels offered great opportunities for masons to use their imaginations in carving grotesque faces, mythical animals and comical scenes. These carvings served no useful purpose, they simply decorated the corbels.
See links below for images:
the castle was developed in the middle ages
The lord in the middle ages lived in the back of a castle !
Castle Rising was built in Norfolk in 1138, and is certainly from the very middle of the Middle Ages. I have added a link to a Wikipedia article below.
They teleported
Arrow loops were very narrow windows in the castle walls and buildings. They could be located just about anywhere. There is a link below to an article on arrow loops.
in a castle with a king
There is no castle "Cinderella's Castle". The castle that is pictured is make believe. The closest one to it is in Germany and is called Neuschwanstien and was built in the 1700's by Ludwig of Bavaria. ( well past the middle ages)
to protect the king and castle
It took about 10 years or maybe even more! And for a castle in the middle ages and how big they were I think it would take 25 years or more!
in the middle ages which is 500 to 1450
Generally a castle or Tower of some sort.
No not really.