Control breaking of overlong section titles

You can use a manual line change in the title (and the optional argument of the \section command to prevent the line change from appearing in the headings and in the ToC). Another option would be to use the \sloppy command and non-breaking spaces (but this will probably produce a bad box):

\documentclass{article}

\begin{document}
\tableofcontents

\section[This is some long text and probably it will be broken]{This is some long text and probably\\ it will be broken}

\section{\sloppy This is some long text and probably it~will~be~broken}

\end{document}