A Closet
as it is used here, means,

A small room or apartment to be used for privacy or prayer.

...But thou, when thou prayest, enter into thy closet, and when thou hast shut thy door, pray to thy Father which is in secret; and thy Father which seeth in secret shall reward thee openly.
Matthew 6:6