Apache Spark automatically partitions data across a cluster of computers to enable parallel processing. Data can be partitioned by key or by range, and the number of partitions can be set manually or calculated automatically based on the size of the data and the resources available in the cluster.