A touchback occurs in two main situations. If one team is kicking off or punting to the other team, and the ball either goes beyond the end zone or if the receiver catches the ball and kneels with the ball in the endzone, that is a touchback and the receiving team in either case will start the next set of downs from their own 20 yard line. No points are given to either team.

In the second case, if the defense intercepts a thrown pass in the end zone (and I guess if they recover a fumble too), and they do not run it out of the end zone then that is also a touchback, and the team that intercepted the ball will start the next set of downs on their own 20 yard line.

A safety on the other hand is when the offense is tackled in their own end zone. I think if they fumble the ball out of the end zone that too is a safety. The other team is awarded two points, and the team that was tackled in its own end zone must then kick or punt the ball from deep in their own territory (I think the 20 yard line). A safety is thus a hard blow to a team because they not only give up points but they also give up the ball to the other team who usually ends up with excellent field position after the kick. (A normal kick off after a touchdown or a field goal is performed from the 35 yard line in comparison.)

We need a good link for American football terms like the one we had for cricket terms.