Both are composed of two elements (that means binary).
Ionic is composed of two ions, metallic cation-positive ions, and nonmetallic anion - negative ions. For example NaCl (sodium-chloride).
Molecular compounds are composed of two nonmetallic elements. For example HCl (hydrochloric acid).