Scalability contributes to the overall performance of a platform by allowing it to handle increasing users, data, and traffic, and the two types of scaling are vertical scaling, which involves increasing the power of a single server, and horizontal scaling, which involves adding more servers to distribute the load.