1 You need to have a physical port with an ip address or a vlan interface with ip address and port assigned to that interface on your switch/router
2 Your pc needs to have an ip address in the same range make sure you can ping between the pc and router interface first so connectivity is there for the tftp to work
3 Make sure no local firewall is running on your pc sometimes this can cause the tftp to fail as it may be blocked depending on whats running
4 Make sure there's enough memory in flash in your device to take the new image , your tftp server is running on your pc and the root folder is set int the tftp server with your IOS ready to upload to the router/switch
http://www.cisco.com/c/en/us/support/docs/routers/2500-series-routers/15092-copyimage.html