If oxygen has a valency of $-2$, $4$ of it would result in $-8$. But iron doesn't have a (variable) valency of anything that goes to $-8$. Then how is $\ce{Fe3O4}$ possible?
1 Answer
Iron, like many of the Transition Metals does have a variable valency, it can valencies of 2+ (ferrous iron), 3+ (ferric iron) and in some cases, 4+ (tetravalent iron).
In regards to $\ce{Fe3O4}$, according to the Wikipedia page Iron(II,III) oxide,
contains both $\ce{Fe^2+}$ and $\ce{Fe^3+}$ ions
A 2-dimensional diagram of $\ce{Fe3O4}$ is below, from the relevant ChemSpider page:
A 3-dimensional model is below (from Wikipedia):
red indicate oxygen