It's actually not all that simple. Which is good, because there are many options.
For nonparametric tests, there is Kruskal-Wallis for one-way designs. The traditional nonparametric test for two-way designs is the Scheirer–Ray–Hare test. But Aligned Ranks Transformation anova is probably a better, and more flexible approach.
Often there is an appropriate generalized linear model for the type of data you have. This gives you all the options and flexibility of an anova-type (general linear model) approach.
There are other other approaches that may have fewer assumptions. Permutation anova. General factorial design with Wald-type statistics.
When the assumptions of a one-way ANOVA are not met, about three alternative approaches can be considered which includes; Kruskal-Wallis, Welch’s ANOVA, and Permutation ANOVA