Usually, foreigners who come to Pakistan and train in terrorist camps are of Pakistani descent, but not always – the infamous Shoe Bomber
, for example, was British, born to English mother and Jamaican father.
You can't just walk into a terrorist training camp. Typically, these young men already know someone there or they have contacted preachers over the Internet. When they arrive in Pakistan, they first attend Islamic schools to receive religious training. Those who recruit them take time to know them, to make sure they're not spies. Once they're sure they're genuine, they dress them up in local clothing and drive them into the hills - sometimes blindfolded - to camps where they are given training in small arms and explosives.
For the kind of crime the Toulouse killer committed, you don't need a whole lot of weapons training – but you need cold-blooded determination. The brainwashing these men receive in the training camps could certainly help with that.
There's also a second scenario – some young men come to Pakistan purely to receive religious training, at first, and then over time get sucked into becoming militants. Still, they usually have a predisposition toward extremism.
Most of these camps are today located in north Waziristan province, in tribal areas. Despite pressure from the US, the Pakistani army stays away. The logic is that these militants are not considered hostile to Pakistan, so they leave them alone. From there, it's easy to travel to similar training camps in Afghanistan – the border is porous. The training men receive in Afghanistan is very similar.