I want to understand why and what is the difference between say ARIMA
and Linear Regression in the context of predicting future stock prices
based on historical data. e.g. date and closing price.
Start to say that we can see ARIMAs as models builded for non stationary/integrated series and we can see ARMA as a restriction on stationaries one. After differentiation we can reduce integrated in non integrated series, so after this passage we can work with ARMA.
Now, limiting ourselves on the comparison between ARMA and linear regression we can say that them are strongly related, in some extent we can conflate them. Suffice to keep in mind that under usual condition (stationarity, invertibility) an ARMA process can be represented as a pure AR one; pure autoregressive.
Regarding the stocks, keep in mind that predict price is easy but predict return is challenging. For (log)price is usual the Random Walk assumption that in ARIMA term is ARIMA(0,1,0); it imply an ARMA(0,0), white noise, for the (log)return.
Read here too: Forecasting Prices vs Returns by Deep Learning
In any case (price/return) insert a time trend in regression is not a good idea.