Dcleve has touched upon two works that are popular in contemporary philosophy of mind, Consciousness Explained and Thinking, Fast and Slow. To his, I'll recommend a third reference: A Universe of Consciousness and answer less in the vein of cognitive science, and more in the vein of philosophy.
An exact answer to your question isn't known, and that is because for all that is known in cognitive science about perception and apperception, and all that is speculated about subjective experience by schools of thought such as phenomenology, it is still an open question about how the two relate with some philosophers clinging to theories based on qualia, and other, like Dennett, who reject qualia completely.
Since Wundt opened the first psychological lab in Leibzig in 1879, started a journal, and began calling himself a psychologist, a lot has been learned about perception. And a number of great thinkers including and since Immanuel Kant and his transcendental idealism have put forth theories trying to tie together perception, intuition, and consciousness, but forging a theory by consensus among philosophers of mind has been slow going.
First, let's note that Cartesianism has essentially been defeated, at least the aspect of it that advocates like Descartes himself, that all aspects of the mind are available to introspection. Clearly we have a subconscious mind and somehow our senses become experience in something that might be broadly called intuition. 'Intuition' features prominently in Kant's Critique of Pure Reason. Qualia is the philosophical language that has been used historically to characterize experience into units.
And what of these qualia? From the WP article:
Daniel Dennett identifies four properties that are commonly ascribed to qualia.2 According to these, qualia are:
ineffable – they cannot be communicated, or apprehended by any means other than direct experience.
intrinsic – they are non-relational properties, which do not change depending on the experience's relation to other things.
private – all interpersonal comparisons of qualia are systematically impossible.
directly or immediately apprehensible by consciousness – to experience a quale is to know one experiences a quale, and to know all there is to know about that quale.
Do theories of qualia explain how neurons firing become a conscious experience? According to Dennett in his Consciousness Explained, no. In fact, he thinks the whole notion should be scrapped. From page 369:
Some snarls should just be abandoned... That's how it is, in my opinion, with the philosophical topic of qualia, a tormented snarl of increasingly convoluted and bizarre thought experiments.
Neural Correlates of Consciousness
So, if keeping in mind qualia, how do contemporary thinkers talk about this matter? Another strong candidate in theories is the language use of the phrase 'neural correlates of consciousness' (SEP). In essence, we can pair up talking about objective phenomena of neuron firing patterns with introspective statements of experience. This is exactly what those who interpret Libet do when they debate whether our subconscious minds make decisions before our conscious ones and suggest that our decisions are epiphenomenal.
It should be noted, that in this way of thinking, one is essentially advocating a form of physicalism where the mental somehow supervenes on the the physical. In physicalism according to Daniel Stoljar, physicalism is essentially a position, from page 7 of his Physicalism:
(7) Physicalism is true (as a worldview) if and only if every instantiated property is either physical or else is necessitated by some instantiated physical property.
So, to make plain, the physical existence of things is necessary for neurons to fire in such a way that they correlate with subjective experiences, more or less. Those experiences happen only if the physical firings of neurons do.
So, the modern approach to conducting dialog about how neural firing patterns become conscious experience is a primary preoccupation to cognitive scientists and analytic philosophers of mind. Edelman and Tononi in their A Universe of Consciousness have an answer: the dynamic core hypothesis. From WP:
The problem of integrating, or binding, the activity of functionally segregated areas of the brain in order to concentrate attention on a particular activity in a short amount of time (typically 100-250 msecs) after the presentation of a stimulus is explored by means of large-scale simulations. It is shown that this can only happen if some elements interact more strongly among themselves than with the rest of the system including a large amount of reentrancy. These functional clusters are only slowly coming into the range of PET or fMRI scanning technology which commonly require much longer time scales.
At any given time, only a small subset of the neuronal groups in the brain are contributing directly to consciousness and this cluster is called a dynamic core. It represents a single point of view and each different state of consciousness corresponds to a different subset. Some dissociative disorders such as schizophrenia may result in the formation of multiple cores.
In essence, the subconscious becomes conscious when attention is focused on particular activities of the mind that draw from neuronal activity beyond the immediate scope of the whole state of consciousness through reentrant neural activity. In this theory, consciousness is a core group of neural processes that examines the states of other neurons Typically, explanations involve a metaphor using a flashlight that explores a room. So, in the Libet experiment, imagine that brain is a house, and consciousness is a room with a lot of doors and windows. Awareness move around like a flashlight in the room focusing on certain things that make their way into the room from the house.
Let's say you touch something hot. Well, your arm jerks away because of the withdrawal reflex, so your conscious mind doesn't even process that. But, if your hand were held down, eventually, the pain receptors would feed the subconscious mind with an afferent firing pattern, and then your brain would then let that pattern into the "room" and the flashlight would focus on it. In the case of a tooth pain, it might be hard not to focus on it. But, not all firing patterns hijack your attention. Sometimes the perceptual system filters out the experience. One example of that is how a sequence of still frames can be used to create the appearance of animation by a continuous change of images above some threshhold of frequency, usually 24 fps.
From WP, perception:
There is also evidence that the brain in some ways operates on a slight "delay" in order to allow nerve impulses from distant parts of the body to be integrated into simultaneous signals.
Perception is one of the oldest fields in psychology. The oldest quantitative laws in psychology are Weber's law, which states that the smallest noticeable difference in stimulus intensity is proportional to the intensity of the reference; and Fechner's law, which quantifies the relationship between the intensity of the physical stimulus and its perceptual counterpart (e.g., testing how much darker a computer screen can get before the viewer actually notices). The study of perception gave rise to the Gestalt School of Psychology, with an emphasis on holistic approach.
So, the question of how a brief transduction translates into qualia is still being worked out with researchers such as Edelman and Tononi and others like Demasio still working on the details. It is clear that the brain screens out certain happenings from the conscious mind, provides them structure, and constructs a continuous experience of time. Other than that, it's a matter of neurological and psychological nuance that hasn't been fully determined, in no small part because the tools to scan the brain do not capture data at the level of the individual neuron.