If we think of consciousness as being aware our surroundings, then even the smallest of creatures can be conscious – for example, the single-celled amoeba is able to move around its environment, find food, and reproduce; it is conscious of its need to survive. Then, as organisms get more complex in structure, we might think that they become more conscious of the environment, and maybe even have the sense of self that we do as humans. However, it is impossible to know that for certain.
As the meaning of consciousness is much debated, so to is how it works biologically. Some people argue that to be conscious, a brain and nerve cells are needed to sense things, whereas others believe that just a reaction to an external change (like movement of the amoeba) is sufficient.