Vertical spacing between sections

I would like to know how I can define the vertical space between:

• a previous section and the new section title;
• the new section title and the following text.

Now it looks like both space measure the same.

The solution depends on the document class. Usually \section is defined \@startsection that is defined in the LaTeX kernel. The article class defines \section the following way:

\newcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries}}


source2e documents the options for the 4th and 5th argument of \@startsection that controls the spaces before and after the section title:

\@startsection{⟨name⟩}{⟨level⟩}{⟨indent⟩}{⟨beforeskip⟩}{⟨afterskip⟩}{⟨style⟩}*[⟨altheading⟩]{⟨heading⟩}

Example that redefines \section with doubled spaces:

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\section{Section A}
\lipsum[2]
\section{Section B}
\lipsum[2]

\makeatletter
\renewcommand*{\section}{%
\@startsection {section}{1}{\z@}%
{-7ex \@plus -3ex \@minus -.4ex}%
{4.6ex \@plus.4ex}%
{\normalfont\Large\bfseries}%
}
\makeatother
\section{New Section C}
\lipsum[2]
\section{New Section D}
\lipsum[2]
\end{document}