A theorem of Ryan and Wolper states that a type A Schubert variety is smooth if and
only if it is an iterated fibre bundle of Grassmannians. We extend this theorem to
arbitrary finite type, showing that a Schubert variety in a generalized flag variety is
rationally smooth if and only if it is an iterated fibre bundle of rationally smooth
Grassmannian Schubert varieties. The proof depends on deep combinatorial results of
Billey-Postnikov on Weyl groups. We determine all smooth and rationally smooth Grassmannian
Schubert varieties, and give a new proof of Peterson's theorem that all simply-laced
rationally smooth Schubert varieties are smooth. Taken together, our results give a fairly
complete geometric description of smooth and rationally smooth Schubert varieties using
primarily combinatorial methods. We also give some partial results for Schubert varieties
in Kac-Moody flag varieties. In particular, we show that rationally smooth Schubert
varieties of affine type A are also iterated fibre bundles of rationally smooth
Grassmannian Schubert varieties. As a consequence, we finish a conjecture of Billey-Crites
that a Schubert variety in affine type A is smooth if and only if the corresponding affine
permutation avoids the patterns 4231 and 3412.