  We introduce generalized Hessenberg varieties and establish basic facts. We
show that the Tymoczko action of the symmetric group $S_n$ on the cohomology of
Hessenberg varieties extends to generalized Hessenberg varieties and that
natural morphisms among them preserve the action. By analyzing natural
morphisms and birational maps among generalized Hessenberg varieties, we give
an elementary proof of the Shareshian-Wachs conjecture. Moreover we present a
natural generalization of the Shareshian-Wachs conjecture that involves
generalized Hessenberg varieties and provide an elementary proof. As a
byproduct, we propose a generalized Stanley-Stembridge conjecture for weighted
graphs. Our investigation into the birational geometry of generalized
Hessenberg varieties enables us to modify them into much simpler varieties like
projective spaces or permutohedral varieties by explicit sequences of blowups
or projective bundle maps. Using this, we provide two algorithms to compute the
$S_n$-representations on the cohomology of generalized Hessenberg varieties. As
an application, we compute representations on the low degree cohomology of some
Hessenberg varieties.
