I really wonder how ions are transported into the brain and the neurons for creating electrical potentials - how do ions get from our digestive system to the neurons? Or are the ions just freely released into the brain like hormones? Or are they transmitted during neural signalling somehow (via neurotransmitters maybe)?
The sodium-potassium pump in the epithelial cells lining the brain capillaries pumps Na+ and K+ into the brain.
The blood-brain-barrier is formed by the endothelial cells lining the capillaries in the brain. Not many compounds can pass this lining, especially not when they are hydrophilic, such as charged metal ions. However, as you rightfully state, somehow these metal ions, and especially Na+ and K+ need to get access to the brain because they are crucial for membrane potentials and action potentials, and hence for neuronal survival and function. And indeed they can, albeit the exchange between blood plasma and brain is slow compared with other tissues.
Intravenously administered K+, for example, exchanges with muscle K+ in 1 hr, but K+ exchange in brain is only half completed in 24 to 36 hr. Na+ exchange is somewhat faster, with half-exchange into brain occurring in 3 to 8 hr. Despite its relatively slow entry into the brain, Na+ exchange across the blood—brain barrier appears to occur by mediated transport. This occurs, in part, through brain capillary Na+,K+-ATPase (the sodium-potassium pump). The Na+,K+-ATPase in the brain also may mediate removal of interstitial fluid K+ from the brain and thereby aid in brain K+ homeostasis.
The cells/neurons themselves have Na+ and K+ channels in their cell membranes that allow for passive movement of these ions between the outside and inside of the cell. If you're wondering how the gradient gets established in the first place, simply put, these channels are built to open/close at the right amounts in their environments. Additionally, the cell uses a Na/K ATP-ase pumps in the cell membrane, which uses the chemical potential energy of ATP, to help regulate and establish that gradient.