1) Is listening to a swear considered to be haram?
2) What does invalidate the fast during month of Ramadhan

Yes listening to swear is haram and not acceptable.
Many things invalidate fast include Eating and drinking intentionally, sleeping while in the state of Janaba intentionally till fajr time, masturbation etc