Majority voting in scikit-learn Random forest
To quote from the documentation:


  The predicted class probabilities of an input sample are computed as
          the mean predicted class probabilities of the trees in the forest. The
          class probability of a single tree is the fraction of samples of the same
          class in a leaf.


The predictions are then simply the class with the highest average class probability.

You can find the source code here.

Note that this is different from classical majority voting which is usually understood to be the most common class prediction among trees whereas here the voting happens on the class probability level. 

The source code for regression is here:


  The predicted regression target of an input sample is computed as the
          mean predicted regression targets of the trees in the forest.