This paper is devoted to the study of solitary waves and solitons whose existence is related to the ratio energy/charge. These solitary waves are called hylomorphic. This class includes the Q-balls, which are spherically symmetric solutions of the nonlinear Klein-Gordon equation, as well as solitary waves and vortices which occur, by the same mechanism, in the nonlinear Schroedinger equation and in gauge theories. Mainly we will be interested in the very general principles which are at the base of the existence of solitons such as the Variational Principle, the Invariance Principle, the Noether's theorem, the Hamilton-Jacobi theory etc. We give a general definition of hylomorphic solitons and an interpretation of their nature (swarm interpretation) which is very helpful in understanding their behavior. We apply these ideas to the Nonlinear Schroedinger Equation and to the Nonlinear Klein-Gordon Equation respectively.