The item required to unlock the secret cow level is the Staff of Herding. To craft it, you must obtain its recipe, five rare items, and 150,000 gold under the Normal difficulty setting. The recipe appears in Act 4 under the Normal difficulty setting, from Izual. The items required for the recipe are as follows. Each of the items bind on acquire and cannot be sold or traded.
Black Mushroom
Collected in the Cathedral in Level 1 of Act 1. Select the mushrooms to find it.
Liquid Rainbow
Found in the Mysterious Cave located at the Dahlgur Oasis in Act 2. Find Zevan the Alchemist outside a boarded up cave, and he will be attacked by vultures. This is a random event, if he does not appear, exit and repeat. Rescue him, and he will open the Mysterious Cave. Once inside, find the Mysterious Chest that spawns randomly at any location. Re-enter the cave and explore it entirely until it is found. time you enter you may need to explore the entire cave before giving up. The Liquid Rainbow is inside the Mysterious Chest.
Leoric's Shinbone
Found in Leoric's Manor in Act 1, appearing randomly in the fireplace.
Gibbering Gemstone
Dropped randomly by Chiltara in the Caves of Frost, before you reach the bridge in Act 3. Search the caves in the Battlefields.
Wirt's Cowbell
Purchase for 100,000 Gold in Act 2 from Squirt the Peddler in the Caldeum Bazaar, under the "Miscellaneous" tab sold.
Craft the Staff of Herding and find a dead cow in Old Tristram, west of the road. Use the Staff of Herding to open a portal into Whimsyshire. To reach higher level versions of the secret area, you must make special new versions for each difficulty setting.