Of course, the specifics will depend on your particular nonparametric method. Gradient boosting is a meta-method, and it typically uses classification and regression trees (CARTs), so I'll work with that.
An interaction is of the following abstract form:
The impact of a predictor A on the outcome depends on the value of a different predictor B.
CARTs can easily model this by first splitting on B and then, on lower levels, splitting on A differently for low values of B than for high values of B.
If you have enough data, this will indeed happen automatically. Since CARTs consider all possible interactions (instead of the user having to explicitly model them), they need much more data to avoid fitting noise, i.e., spurious interactions.