Sexual function, as in all other human bodily systems, is controlled by the central nervous system. Thus, any injury to the central nervous system will affect sexual function.
The question is to what extent function and sensation will be affected with injuries at various levels and degrees of severity. Also, in what ways do the symptoms manifest themselves in males v. females.
As one can imagine, this is a vast and complex subject that cannot be adequately treated in just a few paragraphs.