As the name implies, the driver forwards queries to hosts based on the load-balancing policy chosen. Usually, this distributes the queries evenly amongst the nodes in the cluster. Java driver provides several load-balancing policies. You can create your own load-balancing policies as well.
To set a load-balancing policy, you will have to use the withLoadBalancingPolicy() method of the Cluster.Builder object:
Cluster cluster = Cluster.builder().addContactPoints("127.0.0.1").withLoadBalancingPolicy(LoadBalancingPolicy policy).build();