What is better for time series prediction: AR or ARIMA? I am trying to make a prediction in a time series with window 512 and horizon 2. I want to know if it's worth using ARIMA, that seems to be hard to understand, instead of the simple Autoregressive model?
 A: ARIMA is more general.  It allows fitting certain nonstationary time series and even stationary series that cannot be fit by low order autoregressive models.
A: At the heart of ARIMA modelling is the concept of: 

letting the data speak for itself.

As gung has already said, you should use a model that is consistent with the data. 
Sometimes an AR model provides an adequate representation of the data generating mechanism. Other times an ARIMA model is more appropriate. The key to ARIMA modelling is in employing the iterative process of identification, estimation, and diagnostic checking. Thus, it is advisable not to choose the model a priori. Again, let the data do the talking.
It is, however, worth keeping in mind the principle of parsimony when building ARIMA models. If you are in a situation in which there are two candidate models for the final model, and one has only 1 parameter to be estimated while the alternative has, say, 10 or 20 (or even an infinite amount!), then your best bet is probably going with the more parsimonious model; the one with 1 parameter. Note that in situations like this that it wouldn't do any harm to monitor both models over time.
Finally, it should be recognized that AR and ARIMA models are models from within the same class of models (so, in one sense they share the same degree of complexity) and that a properly constructed ARIMA model - whether the outcome be an AR or ARIMA - will produce optimal forecasts. That is, no other univariate, linear, fixed parameter models have a smaller mean-squared forecast error. It follows that, if you choose the AR model when an ARIMA model is the correct one, the model you have built will not be properly constructed and your forecasts will be sub-optimal.
