First of all look at the signatures of both the methods.
(Here i am considering the methods of Integer class)
Static
String toString(int i)
Static Integer valueOf(String s)
toString returns a String reference and takes primitive value
while valueOf returns a Integer object while taking String as parameter.
I think this helps..