How to predict how the time series behaves in the future? I was wondering how a statistician estimates how a time series continues. Namely, which is more accurate way to estimate the series?


*

*Draw a line between start and end points of the time series data and use the value that the line shows from the future estimate.

*Use more sophisticated methods like ARIMA models.
What are pros and cons between those two methods?
 A: If you simply connect the first and the last data point and extract this line out, then your forecast will heavily depend on the vagaries of your data. After all, you are using just two out of all your data points. If the last observation just randomly happened to be high, all your forecasts will be high, and over time, your forecast could diverge more and more from the actuals.
ARIMA is one alternative. There are simpler ones, like Exponential Smoothing. You can include or exclude trend and seasonality. If you have causal factors driving your series, it is important to model these. The main aspect is that all statistical methods try to use all the available data. (Or, if they ignore some data points, they do so only for very good reasons.)
There are many textbooks on forecasting. I recommend this one.
A: Conceptually all forecasting boils down to extracting the constant. Once you reduce your observations to a set of constant, you're done, because constant don't change, no need to forecast them.
For instance, suppose, you think that your data is a perfect sine wave. In this case you need to know three constants: amplitude, phase and a frequency.
Another example is "stationarity." Time series people like to talk about. Why? Because stationary time series have useful constants such as mean and variance. Once you determined them, you don't need to forecast them, they'll stay the same, right?
What about trend stationary? The same thing: you find the trend, which is a constant rate of growth over time such as $\alpha t$, where $\alpha$ is a constant! The you add the stationary part, maybe: $y=c+\alpha t+\varepsilon_t$, where $\varepsilon\sim\mathcal N(0,\sigma^2)$ You got three constants $c,\alpha,\sigma$ - you keep them... constant and it's your forecast, just plug different $t$ to get $\hat y$
A: To follow up on the other excellent responses: The only way you are going to predict the future of a time series is to assume that it has some non-random structure or pattern that will continue into the future. There are two ways to do this: 


*

*You use a statistical method like ARIMA (or ETS, BSTS, GAM's, etc...). In this case you explicitly have to specify what you think the structure of your time series is: Is it seasonal? Does it have a trend? Do you need to make it stationary? 

*You use a machine learning method, like Neural Networks, Random Forests, etc...In this case you typically don't have to specify explicitly what the structure is, but there still has to be an implicit structure in the signal that your chosen ML method should learn in order to be able to predict the future. 

A: What are really asking is "What is the taxonomy of a time series model ?" and probably should be the first point of order when teaching/learning time series analysis. Kudos to you !
Time series forecasts can include 
1) User specified predictor series which might have a contemporaneous and/or lag effects. These predictors can be either stochastic or deterministic .
2) Latent deterministic structure such as level shifts , trend changes , seasonal pulses and/or pulses . Note the plural suggesting generality of approach and not presumption. 
3) Memory effects of which ARIMA is the most general form being a generalization of simple weighted averages like exponential smoothing (the Brown model ) and other simple procedures like a K period moving average where K is assumed and the k weights are specified either implicitly or explicitly.
Your two particular examples can be characterized as follows :
Example 1 is a particular deterministic effect (type 1) with 1 trend based upon two data points
Example 2 is a type 3 model where it is assumed that the adjusting for previous values is all that is needed AND there are no latent deterministic structures/features in the data. 
Modern approaches ( read general approaches ) consider a hybrid model integrating/optimizing one or more of the three types that I have detailed here.
I suggest that you follow this very broad BUT good question with a more detailed one and actually present data be it textbook data , real data or simulated data and let some of the responders actually illustrate how to build a model in an educational step-by-step approach. Alternative solutions can be rendered with commentary regarding pro's and con's.
All three of these possible components to the time series model must be tested for constancy of the model error variance over time AND constancy of the model parameters over time ...fulfilling the stationarity/reproducability requirements for the model errors .
A visual of the three components ("X" being user-specified ; "I" being latent and waiting to be discovered and the error process ("e") reflecting the ARIMA/memory component or the currently unknown components is here http://www.autobox.com/pdfs/SARMAX.pdf.
Useful models are not necessarily simple models just complicated enough  to characterize the data in a minimally sufficient form where all estimated coefficients are necessary .
Each time series has it's own distinct features that require identification in order to separate signal and noise.
