Esters of acetoacetic acid have rather acidic α-protons (pKa= 10-11) and are ideal for forming stabilized enolates.
While hydroxide ions (OH-) would be sufficiently strong to deprotonate ethyl acetoacetate, the hydroxide ions would also hydrolyze (acyl substitution) the ester to the corresponding carboxylic acid.
Instead, it's more convenient to use an alkoxide base that matches your ester alkyl group, so hydrolysis is not an issue. With that in mind let's look at the overall reaction.
Overall Reaction
Enolate formation and Alkylation - Acetoacetic ester synthesis
In the first reaction, the ethyl acetoacetate is deprotonated to form an enolate. The enolate is then treated with a primary alkyl halide undergoing an SN2 reaction with the enolate. In these steps we made a substituted acetoacetic ester. Hence this is referred to as the acetoacetic ester synthesis.
Decarboxylation
If desired the substituted acetoacetic ester can be easily decarboxylated to form a ketone. Simply heating the ester in acidic water will decarboxylate acetoacetic and malonic esters.
Under these conditions, the ester is first hydrolyzed (acyl substitution) and then decarboxylates. The decarboxylation is a pericyclic reaction (e.g. Diels Alder and Claisen Rearrangement were the other pericyclic reactions you may have seen in Ochem. In the end, a substituted ketone is formed.