the best way to understand someone's feelings is to talk to that person for a while.when we talk to others we get to know more about that this way we would be able to understand that what the person feels and what are his views and thoughts.If he or she becomes a very good friend of your then you will be able to understand his or she feelings better.
ITS actually quite easy 
1. understand his/her situation by just talking to them
2.try to lighten up the situation by shifting his/her  mind to something they like
3.before understanding someones feelings understand the person 
4.take the feelings of that person on your self
5.lastly and what u talk to that person make him/her feel that you really care for them by giving them  asking them some favors from you  

hope this helps