Static and dynamic critical behavior at surfaces