Caret and rpart - does caret automatically prune rpart trees
To give a proper background for rpart package and  rpart method with caret package:

1. If you use the rpart package directly, it will construct the complete tree by default. 
If you want to prune the tree, you need to provide the optional parameter rpart.control which controls the fit of the tree. R documentation below, eg.:

    rpart(formula, data, method, control = prune.control)

    prune.control = rpart.control(minsplit = 20, 
                    minbucket =  round(minsplit/3), cp = 0.01, 
                    maxcompete = 4, maxsurrogate = 5, usesurrogate = 2, 
                    xval = 10, surrogatestyle = 0, maxdepth = 30 )


these are the hyper parameters you can tune to obtain a pruned tree.

One followed way is to not provide the cp i.e complexity parameter and perform cross validation (xval), something like:

    rpart.control(minsplit = 20, minbucket = round(minsplit/3), xval = 10)


complexity parameter (cp) can be thought of as a measure of complexity/ no of splits of your model and you want to increase complexity until your model generalizes to new observations. i.e. regularization 

Therefore evaluate the cross validated error vs cp and choose the cp that gives the good value (cp_good). 

Finally, add it as your control parameter i.e. rpart.control(cp = cp_good) or use the prune function i.e. prune(fit, cp = cp_good) to get the desired tree.

2. caret package on the other hand already implements the rpart method with cp as the tuning parameter. caret by default will prune your tree based on a default run it makes on a default parameter grid (even if you don't supply any tuneGrid and trControl while training your model:

    model &lt;- train(data,
                   labels,
                   method = "rpart")