die Decke
blanket
A large piece of fabric used to cover oneself and keep warm, usually in bed or on the sofa.
Weil mir kalt war, habe ich mir eine zusätzliche Decke geholt.
Because I was cold, I got myself an extra blanket.

blanket / ceiling
Loading your saved state.
blanket
A large piece of fabric used to cover oneself and keep warm, usually in bed or on the sofa.
Weil mir kalt war, habe ich mir eine zusätzliche Decke geholt.
Because I was cold, I got myself an extra blanket.

All meanings of 'Decke' (blanket/ceiling/covering) are derived from the verb 'decken' (to cover). A blanket warms you by covering you; the ceiling covers the room from above; a layer of snow covers the ground.
Die Wolkendecke war heute sehr dicht.
The cloud cover was very dense today.
The preposition helps identify the meaning. When talking about the ceiling of a room, you say 'an der Decke' (on the ceiling). When talking about a bed blanket, you say 'unter der Decke' (under the blanket).
Die Spinne krabbelt an der Decke.
The spider is crawling on the ceiling.
The idiom 'jemandem fällt die Decke auf den Kopf' literally means 'the ceiling is falling on someone's head' and means that someone is bored or restless at home and urgently needs to get out.
Nach drei Tagen Regenwetter fällt mir langsam die Decke auf den Kopf.
After three days of rainy weather, I'm slowly starting to feel trapped at home.
When referring to a warming blanket, typical verbs are 'sich zudecken' (to cover oneself up), 'sich in eine Decke kuscheln' (to snuggle into a blanket), or 'eine Decke umlegen' (to wrap a blanket around oneself).
Er kuschelte sich mit einem Buch und einer warmen Decke aufs Sofa.
He curled up on the sofa with a book and a warm blanket.
In the meaning of 'Schicht' (layer), 'Decke' is often used as the second part of compound nouns, for example 'Schneedecke' (snow cover), 'Wolkendecke' (cloud cover), or 'Staubdecke' (layer of dust).
Über den Bergen hing eine dichte Wolkendecke.
A dense layer of cloud hung over the mountains.
floor / ground
'der Boden' and 'die Decke' form a clear contrast in a room. The 'Boden' is below, where you walk or stand. The 'Decke' is above and closes off the room at the top. They can be confused because 'Decke' can also mean a piece of fabric used for covering yourself, a blanket. In the meaning of a room surface, the orientation is simple: below is the 'Boden', above is the 'Decke'.

An der Decke im Wohnzimmer hängt eine neue Lampe.
A new lamp is hanging from the ceiling in the living room.
Nach dem Putzen war der Boden in der Küche wieder sauber.
After cleaning, the kitchen floor was clean again.