Without getting into details, past returns are used to train a neural network to estimate future returns, N days ahead. This is basically curve-fitting and one reason the popularity of this method fainted after it was tried a few decades ago. If market conditions remain the same the NN prediction will be fine but when they change it fails and the long term performance is near 0 minus trading cost.