I'm very new to minecraft & am playing in survival mode. The first few nights I noticed Enderman wandering near my base. I didn't know what he was so I just avoided him. Fast forward several days of playing; I was farming outside during the day & as I enter my house I see this shimmery thing floating around. I follow it & next thing I know this thing is standing in my bedroom holding a dirt block. I still don 't know what he is or his mechanics. He starts walking away from me but doesn't want to leave. He hasn't attacked so I try to physically push him out the door until finally he teleports. I thought that was it but I was still hearing weird noises. I have a rooftop garden & I found him wandering up there. I'm sick of the sounds he makes & just want him to go away so I attack. He would teleport into the distance & then teleport back but never attack me. I kill him & he dropped xp orbs but nothing good. Afterwards I looked him up & his description doesn't at all match how he acted. Survival mode during the day, I was looking right at him the whole time & even attacked but he never attacked back, he just wouldn't leave. Did I get a glitched one?
Definitely a glitch. Looking at the Enderman's head, or attacking him enrages him. Sometimes the game takes a couple seconds to trigger the aggro mode, but rarely more. Normally Endermen are peaceful, unless you trigger their aggro by the above methods; they can teleport in a rather wide range. They also can't fit into a 2-tall gap, which makes killing them from within a 2-tall shelter quite easy (fighting them in open field is unadvisaed; they hit hard and fast; they are also hurt by water so spilling a water bucket under your feet allows to form a defensive position if you're caught by one in the open.)
They can pick up and place a certain set of blocks (dirt, sand and their variants, netherrack and a couple more); When killed, in 50% cases they drop an Ender Pearl (more when killed with Looting enchanted sword); the Ender Pearls are essential in finding and opening the End portal - so if you plan to reach the endgame content (obtain Elytra and Shulkerboxes) you will have to kill quite a few of them.