During the day the sun's energy is transmitted through the lid and stored in the soil floor of the frame. At night, heat loss from the soil is slowed by the cold frame. Insulating the inside walls and covering the lid at night with old blankets can further reduce heat loss. A hotbed, in addition to slowing heat loss, would be able to replenish some of this lost heat due to its additional heat source. Depending on your needs cold frames and hotbeds can be very simple or quite elaborate.
Sizes can vary also.
The back should always be higher than the front to allow as much sunlight as possible to enter the frame. Lengths can be unlimited but most sources suggest multiples of 3 feet. Using galvanized wood screws will allow you to take the frame apart so it can be stored for the winter thus increasing its useful life. Automatic vent controllers are reasonably priced and these will open the lid on the cold frame to maintain a pre-set temperature inside. These can be very advantageous since temperature control during the day can be one of the more difficult problems to overcome when growing plants in a cold frame or hotbed.