In the early ages, a very usual method, in which the Lord communicated himself to his people, was by visions and dreams.
Related Commentaries of Genesis 28:12
Genesis 28:12
12 And he dreamed, and behold a ladder set up on the earth, and the top of it reached to heaven: and behold the angels of God ascending and descending on it.