The best way is to use a cheese grater.  It will keep the shredded pieces nice and even.  You can also put the carrots in a food processor and pulse gently until finely grated.