You can think of the process of solubilization of a solute A as a reaction:
$$\ce{A(\text{solid})-> A(\text{soln})}$$
If the reaction results in a net formation of bonds - by which it is meant that the interactions in the product are stronger than in the reagent - then there must be an accompanying release of excess thermal energy to the solvent to balance the reduction in potential energy. If the reaction is performed at constant temperature and pressure (in contact with a thermostat) then that thermal energy will be transferred as heat to the surroundings, and we call the process exothermic.
Unfortunately however, the statement that your teacher wrote, while at times true, is not general. It is in fact common to dissolve a solute with accompanying net breaking of bonds, that is, with bonds among product being higher in energy (weaker) than in the reagent. As you might imagine, this requires an input of thermal energy, and if the temperature is kept constant the result is a transfer of heat into the system.
While the exothermic case can occur (up to a point) even when the system loses entropy, the later endothermic scenario requires some way of compensating the surroundings for the loss of thermal energy, since that loss results in a decrease in the entropy of the surroundings. This compensation takes the form of an increase in the entropy of the system.
A good example is a solution of $\ce{NaCl}$ (at normal TP). The process is endothermic ($\Delta_{\text{solv}} H>0$) but the entropy change compensates for the heat gained from the surroundings.