The fundamentals of MIMO communications and MIMO sensing are firstly analyzed with regard to channel and sensing capacities. It is shown that the different objectives of communications and sensing lead to different signaling waveforms required for achieving their capacities. Hence, the optimization of integrated sensing and communications (ISAC) is relied on a trade-off expected between the performance of communications and that of sensing. Following this observation, the design and resource optimization in general MIMO ISAC systems are discussed along with the analysis of some existing ISAC schemes. Furthermore, the design of ISAC in mmWave communications is addressed. Specifically, the principle of sensing in mmWave systems is established, and a range of optimization alternatives for ISAC design in mmWave systems are reviewed.