France temporarily reintroduced border controls. Will I have trouble if I cross the France-Spain border on foot by a hiking trail?
France/Spain is an internal border to both the Schengen area and the European Union, therefore you are not required to pass any immigration or customs check. You must present your papers and submit to a search if requested by the authorities. But you are not required to seek them out. It is legal to cross the border without notifying anybody.
If you do get controlled, then in all likelihood all you'll need to do is show your passport. As long as you have a valid visa (or you don't need a visa to be in the Schengen area), this is just a formality.
At the moment, France makes lots of controls on the border with Italy, because it's a major route for migrants, but the border with Spain is looser.
Note that this does not apply to Andorra. Andorra is neither in the Schengen area nor in the European Union, so if you go in or out you must seek a border post, and if you aren't from the EU/EEA then you will get Schengen exit and entry stamps (and if you need a visa in advance, that means you need a multiple-entry visa to exit Andorra).