While Ert's and Ben's answers are excellent, they rely on the assumption that you understand how to perform statistical modelling on time series, which is not a trivial topic. Entire books are written on this and this simple answer is only an quick introduction using linear regression as an example.
Time series linear regression
Assumptions
As with linear regression of cross-sectional data, time series regression requires a set of assumptions to be met in order to perform statistical inference. The strongest set of assumptions are the Gauss Markov conditions, which are often impractical with real data. A weaker set of assumptions are the asymptotic Least Squares.
Given a model
$$ Y_t = \alpha + \beta_1 X_{1t} + \beta_2 X_{2t} + ... + \epsilon_t$$
We require the following:
- Linear model: $Y_t = \alpha + \beta_1X_{1t} + \beta_2X_{2t} + \epsilon_t$
- Stationarity in mean, variance and covariance
- Weak dependence, i.e. correlation tends to zero $ Corr(X_t , X{t + h}) \rightarrow 0 \ \ \text{as} \ \ h \rightarrow \infty$
- Weak exogeneity $E[\epsilon_t | X_{it}] = 0$ - note that this is less restrictive than the strict exogeneity assumption, as it does not depend on all times, but only on the particular time $t$
- No perfect colinearity - as usual for Gauss Markov conditions
- $Var(\epsilon_t | X_{it}) = \sigma^2$ - this is less restrictive than Gauss Markov as it is only for the particular $t$
- $Cov(\epsilon_t, \epsilon_s | X_t, X_s) = 0$ - less restrictive than Gauss Markov as only depends on time $t$ and $s$.
If assumptions 1 - 5 are satisfied then the parameter $\beta_{LS}$ are consistent. Additional assumptions 6,7 allow to perform inference using the CLT etc...
If all these assumptions are satisfied then you can perform a straightforward linear regression on the model, and use a t-test to test for the significance of a single variable, or an F-test for the significance of the whole model. Have a look here for a recap of the maths and a Python implementation
When assumptions are not met
The reason entire books are written on this topic is that dealing with violations of these assumptions can be difficult, and often requires some subjective decision makings, various statistical tests, pre-processing steps etc...
An example
Consider fitting a linear model on US consumer expenditure % change levels based on % change in income, production, savings and unemployment.

A few checks on the data show that the above assumptions are mostly met. Fitting a linear regression model and performing t-tests on the significance of the variables gives

The fitted model isn't too bad

Source