"Fire" and "give the sack" are pretty much the same. They mean, like flora said, to make somebody leave their job. "Dismiss" is a more formal version of these, if you were writing to your boss to ask why you were asked to leave, you wouldn't say "please explain why I was fired" but "please explain why I was dismissed".
Also "dismissed" has other meanings,
1) "temporary relief from duty" eg "at the end of their parade the soldiers were dismissed" = they were no longer on duty, "as the clock struck 4 all the factory workers were dismissed" = allowed to go home
2) "waved aside, ignored" eg "dismissing his friends' warnings that the roof was unstable, the idiot continued to dance and fell off"
"Discharge" is used for more formal/military situations. You aren't dismissed/fired from the police/fire brigade/army etc, you're discharged - normally either honourably (i.e. you just left, retired or they didn't need you any more) or dishonourably (you did something bad). "Discharge" also has other meanings,
1) as a noun, a leak eg "a small chemical discharge was found on the outside of the tank". this is also used in medicine, eg nasal discharge
2) to fire a gun, rifle etc.