The brain weighs approximately three pounds and fits very securely in the skull. The purpose of the skull is to protect the brain from damage. Our brains control everything we do from moving, feeling, tasting, etc so it is very crucial that the brain be protected. The brain is directly connected to the spinal cord so it would impossible for the brain to actually freely move around. The brain is covered with a protective membrane that is called the dura mater. In addition to this membrane, the brain is surrounded by fluid.
First thing, it is not as if the brain is not attached to anything in the skull. The brain is attached to the spinal chord. Thus it is not freely floating or hanging in the skull. Second there are many different layers of protective covering between the brain and the skull that cushion and hold the brain in position. This covering called meninges consists of three layers named dura matter, arachnoid, and delicata pia. In addition , a clear liquid called cerebrospinal fluid separates the pia mater and the arachnoid, and provides a a cushioning between the soft tissues of the brain and the hard bones of the skull.
The relation between brain and skull is significant in both developmental and evolutionary ways. The brain stays steady in the skull due to a balance in intracranial pressure, which if impaired result in serious dysfunctions. It is not that the skull and brain are not anatomically disconnected.