Scala can be used to build web applications in several ways: 1. Lift and Scalatra allow building web applications by embedding Scala code and XML directly in the code. 2. Libraries like Ajax.scala, Scalate, and Unfiltered provide APIs for building web functionality and handling HTTP requests and responses programmatically in Scala. 3. Frameworks like Play allow building traditional MVC web apps in Scala with automatic JSON and XML conversion between case classes and HTTP requests/responses.