In this paper we introduce new techniques in order to deepen into the structure of a Leavitt path algebra with the aim of giving a description of the center. Extreme cycles appear for the first time; they concentrate the purely infinite part of a Leavitt path algebra and, jointly with the line points and vertices in cycles without exits, are the key ingredients in order to determine the center of a Leavitt path algebra. Our work will rely on our previous approach to the center of a prime Leavitt path algebra [13]. We will go further into the structure itself of the Leavitt path algebra. For example, the ideal I(Pec ∪ Pc ∪ P l) generated by vertices in extreme cycles (Pec), by vertices in cycles without exits (Pc), and by line points (P l) will be a dense ideal in some cases, for instance in the finite one or, more generally, if every vertex connects to P l ∪ Pc ∪ Pec. Hence its structure will contain much of the information about the Leavitt path algebra. In the row-finite case, we will need to add a new hereditary set: the set of vertices whose tree has infinite bifurcations (P b ∞).