Type of exercise influences its neural effects: what the data says
Firstly research suggests that exercise must be in the long-term to maintain cognitive benefits. Additionally, even moderate exercise has shown to improve memory and prevent cognitive decline, suggesting that any kind of exercise - as compared to no exercise - is helpful.
With regards to the type of exercise, short periods of high intensity exercise suggested to be more beneficial than longer, less intense workouts - specifically by raising executive function, BDNF levels (that promote neurogenesis), hormones that elevate mood (catecholamines) and learning. Nevertheless, generally it is suggested that the overall amount of exercise matters most for brain health - it is less dependent upon the type of work done.
Additionally, research suggests that exercising with people or within a community is better than doing so in isolation. Moreover, exercise involving cognitive function - such as sports - has indicated higher brain benefits. Thus, ideally a sport or at least workouts involving social interaction are better for the brain as opposed to its alternatives.
Lastly, exercising in the cold - or at least, not in the heat - raises neural function.