If this happens just once in a while, it might be that your cake batter is not mixed thoroughly. Try beating it for another minute or so and try again.
If all of your cakes turn out uneven, the problem may be your oven. Uneven heat may cause cakes to rise haphazardly. Try turning your cakes a few times while they are baking to see if this helps.
An oven that is too hot will cause uneven baking. Use an oven thermometer to check your oven’s accuracy. If it is 25 degrees higher than the setting, just lower your baking temperature by 25 degrees. If the temperature is off by more than 25 degrees, have the oven recalibrated.
It is also possible that uneven baking occurs because your oven is not level. To check, fill a loaf pan with water, place it on the oven’s middle rack, and look to see if the water level is even. If not, your range’s leveling legs may need to be adjusted.