What is consciousness?
Consciousness refers to our awareness of our existence and is a complex topic that has been analyzed by philosophers and scientists for centuries.
The mind-body problem
The mind-body problem is the debate regarding the mind (consciousness) and the matter (physical world) and how they are related. There are generally two main categories of approaches towards the mind-body problem, dualist and monist (non-dual) views. Dualist views maintain that there is a distinction between the mind and the body, whereas monist views maintain that there is a single unifying reality.
The philosopher Renee Descartes attempted to address the mind-body problem and explain the nature of consciousness by describing it as "a substance distinct from matter," which he believed was linked to the soul. In his book Discourse on the Method, he made the now famous statement Cogito, ergo sum (translated as “I think, therefore I am”).
The self is the sense of identity that one has within their own consciousness.
Now, take which of these suppositions you please, it is impossible to make personal identity to consist in anything but consciousness; or reach any further than that does.
For, by the first of them, it must be allowed possible that a man born of different women, and in distant times, may be the same man. A way of speaking which, whoever admits, must allow it possible for the same man to be two distinct persons, as any two that have lived in different ages without the knowledge of one another’s thoughts.
By the second and third, Socrates, in this life and after it, cannot be the same man any way, but by the same consciousness; and so making human identity to consist in the same thing wherein we place personal identity, there will be difficulty to allow the same man to be the same person. But then they who place human identity in consciousness only, and not in something else, must consider how they will make the infant Socrates the same man with Socrates after the resurrection. But whatsoever to some men makes a man, and consequently the same individual man, wherein perhaps few are agreed, personal identity can by us be placed in nothing but consciousness, (which is that alone which makes what we call self) without involving us in great absurdities.
-- John Locke (An Essay Concerning Humane Understanding)
Consciousness includes all awareness or thoughts; hence subconsciousness refers to unconscious thought processes. The subconscious is the part of the mind that our awareness has no direct visibility into, though it has direct impact to the parts of the mind we are aware of.