Dickens doesn't show us exactly how the spirit gets into Scrooge's room. Instead we know that Scrooge is asleep, then awakened by the clock chiming, and then the spirit pulls back the curtains on his bed to reveal himself.
After Scrooge gets up, the spirit gestures to the window and Scrooge says he is "mortal and liable to fall," but the spirit prompts Scrooge to hold his hand. Then,
"as the words were spoken, they passed through the wall, and stood upon an open country road, with fields on either hand" (Stave II).
Based on how they left the room, we might be able to assume that the spirit initially visited Scrooge in the same way, but we just don't know. Even the description of the spirit is very fantastical and leads us to believe that the spirits have many powers that we are not aware of, so the arrive into the room could have happened many ways.