Optimizely works by providing tools to create experiments without extensive coding knowledge. Businesses can set up multiple versions of their web pages or apps and run these versions to see which one performs better based on predefined metrics. This is achieved through features like split testing, multivariate testing, and personalization.