Backtests are a way to visualize how a strategy would've performed, given historical data. It's a cornerstone of developing trading strategies, since they give a general idea on what to expect in the future. However, it's generally bad practice to rely solely on backtests when making a decision on which strategies to run.
Disclaimer: Backtests are optimized using historical data under ideal conditions and not a guarantee of future results.
Note: Backtests do not calculate potential price slippage during testing.
For more detail: