The Buddhist view of ego is that it is the neurotic "self" which we create to avoid seeing reality as it is. It begins when, instead of looking at something and seeing it as part of the whole, we label and pigeon-hole it, and form an opinion. We decide whether we like it or not, what qualities we perceive in it, and through repeatedly doing this become rather subjective and narrow-minded in our viewpoint of the world. Our way of life and our thought patterns become static in a constantly changing universe, forcing us to incessantly create extra "layers" to keep up with it and thus compounding the problem rather than solving it. We begin supressing emotions or desires, or perhaps just giving in to them, letting them have free reign in order to "release" them from our system.
The ego also tends to latch on to things in order to feel safe, to create a centre around which to revolve our world until the world revolves around ourselves and we once more feel satisfied with our perceived importance. Anything can become this centre, including the neuroses we consider normal behaviour in human beings, such as the need to love and be loved, dedication to some cause, or even the desire to be rid of a centre. Even the thoughts that race through our minds every second are part of the things which hinder our view of what is.
In the Buddhist tradition, meditation is the first step to peeling back the layers of the ego, and there are many steps toward the egoless self. The danger is that we may follow these steps thinking we are well on the way to enlightenment when in fact our ego is fooling us into thinking such. All we have done is added another layer and go around convinced we have transcended ego and attained Buddhahood, a state of mind which gradually disintegrates into the normal self, back to square one.
True enlightenment is not some upward journey toward sudden blissful transcendental awareness but a gradual working backwards until we are able to percieve without judgement, a slow awakening to what has been here all along, but which only now is seen with perfect clarity, seen as an integral part of the whole. All notions of an individual self or a person seperate from the whole disappear, the dualistic view of the universe is risen above, and things just are.