Consider this. Your vet treats all sorts of different animals. You take a box into the vet and they know that there's an animal inside but they don't know what type of animal, so they don;t know how to treat it. You tell the vet that it's a cat, so they know know to treat it as a cat. Here's the VB code for what you just did:
Dim myAnimal As Animal = myBox.Contents
Dim myCat As Cat = DirectCast(myAnimal, Cat)
DirectCast performs a cast, which is telling the compiler what sort of object a variable refers to when it's different to the type of the variable. The actual object doesn't change at all when you cast.
CType cn do the same but it is also capable of changing the type of an object or, more accurately, creating a new object of a different type with an equivalent value. For instance, this works:
Dim obj As Object = "Hello World"
Dim str As String = DirectCast(obj, String)
because the actual object referred to by 'obj' is a String, so the cast is valid. This also works:
Dim obj As Object = "100"
Dim num As Integer = CType(obj, Integer)
because, although the object referred to by 'obj' is a String, it contains a valid representation of an Integer so CType performs the conversion. This, on the other hand, will not work:
Dim obj As Object = "100"
Dim num As Integer = DirectCast(obj, Integer)
because you cannot cast a String as type Integer. DirectCast can NOT change the type of the object, just the type of the reference. DirectCast is more efficient so it is preferred when you're performing a genuine cast, but CType is required if a conversion will or might take place.