The TLDR; to your question:
How can one use realized volatility as a volatility model to do out-of-sample prediction? You extend known models to incorporate additional information procured from high-frequency data. Going from the vanilla GARCH to a realized GARCH model can be done by adding an auxiliary model as an external regressor that captures intraday variation. The realized GARCH model can forecast $h$-periods ahead, with $h$ being days.
How is RV a model and how can I do out of sample prediction using RV? RV is not a model but a non-parametric measure of intraday variation. The estimates procured from realized measures have no model-based relationship between days (eg. they lack an auxiliary model, like an ARMA representation, linking them between days), so they cannot be used for $h$-period ahead forecasts. That is why you incorporate it into a model: to create a relationship between days that tries to satisfy empirical features of returns and intraday returns (roughly speaking).
An introduction: From GARCH to realized GARCH
Many of my arguments below, can be found in the paper of Hansen et al. (2012) together with Peter Reinhard Hansens slides on the same topic. Let us briefly consider the vanilla GARCH model. We define the de-meaned returns on the form:
\begin{equation}
r_t = \sigma_t z_t, \qquad z_t \overset{iid}{\sim}N(0,1)
\end{equation}
with the GARCH equation being:
\begin{equation}
\sigma^2_t = \omega + \alpha r_{t-1}^2 + \beta \sigma_{t-1}^2.
\end{equation}
Now, we can ask ourselves the question:
- Why can't we use an ordinary GARCH model with intraday volatility? We can, and it works great! The original GARCH model uses noisy squared returns to extract information about the current level of conditional variance. However, noisy squared returns are not suitable under periods of drastic persistent changes in the variance, implying that the updating of the GARCH model is simply too slow to "catch up" to the new level of volatility. This lead to the GARCH-X models, which extend the original GARCH model by adding a realized measure as an external regressor:
\begin{equation}
\sigma^2_t = \omega + \alpha r_{t-1}^2 + \beta \sigma_{t-1}^2 + \gamma x_{t-1},
\end{equation}
where $x_t$ is a realized measure of volatility, eg. Realized variance (RV), Realized kernel, etc. In the slides (p. 37) they do a small experiment and observe how many days it takes for the vanilla GARCH model to update to a new level of volatility, as opposed to the GARCH-X model:

Observed above, it is clear that the GARCH-X model is much faster at updating to the new shift in volatility.
NOTE: We utilize both high- and low-frequency information by adding an external regressor instead of replacing noisy squared returns, $r_{t-1}^2$, with $RV_{t-1}$ and adding no external regressor. The additional information in the former approach gives better volatility estimates (we also have one more degree of freedom).
While the GARCH-X specification improved the time it took for the model to update to the new level of volatility, it did not permit multi-period forecasts due to lacking an auxiliary model on the realized measure. This is where Hansen et al. (2012) comes in.
Completing the GARCH-X model: The Realized GARCH model
In Hansen et al. (2012) they extend the GARCH-X model to incorporate intraday return variation, by adding a measurement equation as an external regressor to relate the estimated realized measure (eg. $RV$) to the latent volatility process. Moreover they include a function that captures asymmetric reaction to shocks (ala. EGARCH type structure), thus making a very flexible and rich representation. They provide two specifications called the linear Realized GARCH model and the loglinear version (LRG). I will focus on the linear specification. From the GARCH-X model they extend the $x_t$ via the measurement equation given by:
\begin{equation}
x_t = \varepsilon + \varphi \sigma_t^2 + \tau(z_t) + u_t,
\end{equation}
where $u_t \overset{iid}{\sim}D(0,\sigma^2_u)$ for $D(\cdot)$ being a generic distribution (usually Gaussian) and furthermore $z_t$ and $u_t$ are independent. In their paper they write some important features of the measurement equation,
The inclusion of the realized measure
in the model and the fact that $x_t$ has an autoregressive moving average (ARMA) representation
motivate the name Realized GARCH. A simple yet potent specification of the leverage function is
$\tau(z) = \tau_1 z + \tau_2 (z^2-1)$, which can generate an asymmetric response in volatility to return shocks.
As you pointed out above, you can use an ARMA representation to explain the realized variance, however, here they combine an ARMA representation, with a GARCH equation. Moreover, as seen above, they define a simple and yet potent specification
of the leverage function based on the Hermite polynomials (truncated at the second level). The function is convenient since it ensures $\mathbb{E}\left[\tau(z)\right]=0$ whenever $z$ is specified with mean zero and unit variance. Based on pure intuition, we see that ceteris paribus, when $\tau_1 < 0$, $x_t$ will be larger for
a negative shock (measured by large negative residuals $z_t < 0$), since $\tau(z)>0$. For $\gamma>0$ this will in turn lead to a pronounced effect in $\sigma^2_t$. Their paper contains many additional discussions on the realized GARCH model, however, I have briefly summarized their conclusions below.
Conclusions of their paper:
The realized GARCH model is parsimonious, have tractable analysis (can be estimated via QMLE) and allows for multiperiod forecasting.
From their empirical analysis, they find evidence that the LRG(1,2) model provides the most consistent results and outperforms all other benchmark models. Furthermore they favour the LRG model since it provides less heteroskedasticity in the measurement equation, making QMLE more efficient as opposed to the linear specification (see section 5.5 in the paper).
They argue that the realized GARCH model is flexible since it can incorporate different realized measures.
Honourable mentions: Realized EGARCH, HEAVY and HAR
I will briefly discuss some other realized models you can research yourself, without going into details:
The same authors construct a realized EGARCH model, and is an extended specification of the above realized GARCH model. It can be found in the papers, Hansen et al. (2014) and Hansen, P. R., & Huang, Z. (2016).
Sheppard & Shephard (2009) constructs the HEAVY models, which use realised measures as the basis for multi-period-ahead forecasting of volatility, by having two (or more) latent volatility processes (one for $\sigma^2_t$ and another for $x_t$) and linking them differently as opposed to the realized GARCH specification.
Corsi (2009) creates a Heterogeneous Autoregressive (HAR) model, that constructs a reduced-form linear relationship between 3 volatility components being daily, weekly and monthly. The model is extremely parsimonious and have good forecasting abilities. This is also the reason for its increased popularity. Furthermore, it has been extended to account for different aspects inherent in high-frequency data. Mathematically, the model is based on the premise, that the underlying data generating process follows a pure diffusion, implying that the model will estimate quadratic covariation in presence of jumps. Many authors have further extended the univariate model following the same simplified setup, such as the HARQ and HARQF model of Bollerslev, Patton, & Quaedvlieg, (2016) and the SHAR model of Patton & Sheppard, (2015). I have provided a brief explanation of the SHAR model here, which also gives you an introduction to the structure of a HAR-type model.
FYI: Linking realized measures to realized models
Below, I have provided a clear and concise meaning of the different terms and how they relate to each other:
A realized measure (eg. realized variance): estimates volatility each day and have no model-based relation between two separate days (eg. an auxiliary model like an ARMA representation). A very good paper giving you an overview of different realized measures can be found here.
HAR with realized measures: Provides a linkage between different days and you can do multiperiod forecasts. Still, it only uses realized volatilities (realized measures).
Realized GARCH: uses both daily returns and realized volatilities (found from realized measures) to model volatility, $\sigma_t^2$, and provide a linkage between different days.
Many of the realized measures and models are implemented in R
, either via the rugarch
package or the highfrequency
package. I hope this provides some insight. I wish you good luck with your thesis.