Summon the Lunatic Cultist by killing the four Cultists at the Dungeon entrance after Golem. Where they spawn, how to spot the real Cultist, every attack and the drops.
You summon the Lunatic Cultist in Terraria by killing the four Cultists that gather at the Dungeon entrance once Skeletron and Golem are both dead. When the last one falls, the Lunatic Cultist rises from the Mysterious Tablet they were chanting around and the fight starts. There is no summon item.
The Lunatic Cultist is the last boss before the Lunar Events. Beating it starts those events right away, and they lead straight to Moon Lord, so only kill it when you are ready to keep going.

Notable drops:
After Golem dies, a group appears in front of the Dungeon entrance: two Cultist Archers and two Lunatic Devotees standing around the glowing Mysterious Tablet. They are passive at first. You can walk through them, and they don't deal contact damage until one of them is attacked.

Once you hit any of them, the Archers fire arrows at you while the Devotees keep chanting. Kill all four and the Lunatic Cultist appears at once. It can't be hurt during its short rising animation.
If you don't see them, check these conditions:
Note: Watch out for weapons and armor that fire on their own. The Leaf Crystal of Chlorophyte armor can hit the Tablet area and wake the Cultists before you are ready.
The fight happens right at the Dungeon entrance, so build your arena there before you touch the Cultists. A few long rows of platforms above the entrance give you room to move, and some solid blocks to hide behind are useful because many of its attacks can't pass through walls.
By this point you should have gear from Golem and maybe Duke Fishron or the Empress of Light. Bring a weapon that hits through walls or a yoyo, so you can keep attacking from cover.
The usual buffs help: Ironskin, Regeneration, Endurance, Lifeforce, Swiftness, Wrath or Rage, and your class potion. Keep a full stack of Greater Healing Potions in your quick heal slot.
The Lunatic Cultist has 32,000 health in Classic, 48,000 in Expert and 61,200 in Master, with 42 defense. It teleports above you between attacks and runs them in a fixed order: Fireball, Ice Mist, Lightning Orb, Fireball, Ice Mist and the Ritual.

The ritual is the part that decides the fight. Copies that survive a ritual fly next to the Cultist and throw homing Shadow Fireballs, up to six at a time. Look for these signs of the real one:
Below 50% health its defense drops to 27 and it adds Ancient Light: two volleys of five glowing orbs that fly through blocks and explode on contact. Homing weapons and minions can shoot them down. In Expert and Master it can also cast Ancient Doom, purple orbs that appear around you and burst into four deadly beams after 7 seconds. Destroy them quickly or move well away.
Note: The Lunatic Cultist only takes 75% damage from homing projectiles, so a non-homing weapon is a better choice when you can aim it reliably.
The Lunatic Cultist drops no weapons or accessories. It always drops the Ancient Manipulator and 5 to 15 Greater Healing Potions, plus the Lunatic Cultist Mask (14.29%) and Trophy (10%). Master Mode adds the Lunatic Cultist Relic and a 25% chance at the Tablet Fragment pet.

The Ancient Manipulator crafts the Lunar Fragment weapons, the Celestial Sigil and later the Luminite gear. You only need it once, so there is little reason to farm the Cultist again. After the kill, the Clothier also starts selling the Solar Cultist outfit during the day and the Lunar Cultist outfit at night.
Killing the Lunatic Cultist starts the Lunar Events with the message "Celestial creatures are invading!" Four Celestial Pillars appear across the world, and there is no way to stop the event except by destroying all of them. Destroying the last one summons Moon Lord, which is covered in How To Summon Moon Lord.
The Cultists come back to the Dungeon after all four pillars are destroyed, so you can start the Lunar Events again for more fragments. If you need to catch up on the earlier bosses first, see How To Summon Skeletron and How To Summon Golem.