With time, some snakes can be persuaded to eat from the owners hand, these are the exception. Get your snake feeding in private first and get it settled before attempting anything more adventurous. When the snake strikes for the food, release and replace the lid of the box. Sometimes this won't work. Force feeding is a pain and will be dealt with seperately.
Corns have a reputation for being easy feeders, although there are exceptions.
A Corn that refuses food over a period of weeks for no reason should be suspected of possibly having either worms or an intestinal infection. A vet visit should sort either problem out fairly easily. See the seperate section on Vetinary care. If the snake still refuses to feed, hand feeding or force feeding may have to be resorted to. This is usually a problem with smaller snakes and requires patience, assuming a small snake, get a pink mouse, grip the snake gently, but firmly behind the head and use the head of the mouse to gently prise the jaws apart, introduce the head of the mouse to the back of the snakes mouth, this is sometimes enough to stimulate the feeding response and the snake will eat by itself.