The phrase "hard feelings" has the meaning of any resentment, hatred, or other bad emotions someone is feeling toward another person.
The question "Any hard feelings?" is used to determine if something caused another person emotional distress or to dislike you as a result. If Jane accidentally drops a heavy box on Bobs foot, she might ask him "Any hard feelings?" to see if she has made him angry at her.
The sentance "No hard feelings." is used to inform someone that you are not angry at them for something they have done. If Bob is not angry at Jane for dropping the box on his foot, he might reply to her question using this phrase.
Occationally, the phrase "No hard feelings" may be used in situations where mutual damage was done. After a fistfight between Bob and Joe, if Bob says "No hard feelings", he is letting Joe know he is not angry at Joe about the fight. If instead he asks it as a question ("No hard feelings?") he is offering to forget anger related to the fight as long as Bob is also willing to do so.