Origin of the term and use in Canadian football 
American football and Canadian football originate in rugby football, and so does the onside kick. In rugby, while the forward pass is prohibited, a team in possession may legally kick the ball downfield and recapture possession, provided that the receiver of the kick was onside when the kick was made (i.e., level with or behind the kicker.)
This form of onside kick is still legal in Canadian football, just as in rugby. A player of the kicking team (at any kick, not just a free kick) who is "onside" may recover the ball and retain possession for his team. This includes the kicker himself and anyone else behind the ball at the time it was kicked, other than the holder for a place kick. The form of onside kick available at a free kick in American football (see below) is also available in Canadian football for a kickoff as well; however, the kick may well be chipped high instead of bounced, because the players of the receiving team have no particular first right to the ball as in American football (due to the fair catch rule); both sides may play the ball equally, even in the air.
Modern American football usage 
Since at least 1923, the onside kick has been subject to additional constraints in most forms of American football, and the term is now something of a misnomer in American football. The restrictions that must be met in order for the ball to be recovered are:
- The kick must be a free kick (a kickoff, or free kick after a safety, but not the rare fair catch kick)
- The kick must cross the receiving team's restraining line (normally 10 yards in front of the kicking team's line), unless the receiving team touches the ball before that line.
- The kicking team may only recover and retain possession of the kicked ball, but not advance it.
- The kicking team must not interfere with an attempt by a player of the receiving side to catch the ball on the fly. 
In essence, an "onside kick" in American football is the same as any other kickoff or free kick, except that it is kicked in a particular way in order to give the kicking team the best chance of fielding the ball and retaining possession--typically in a diagonal direction and as close to the advancing players from the kicking team as possible. An alternative method is to kick the ball with a great deal of force directly at an opposing player. If the ball touches the player, but he cannot secure it, it becomes live regardless of whether it has traveled 10 yards.
Once the ball has hit the ground there is no chance of a catch and hence no possibility of interference. Thus the kicking team generally attempts to make the ball bounce early and be available around 20 yards in front of the spot of the kick. One technique, useful especially on a hard field such as one with an artificial surface, is to kick the ball in a way that it spins end-over-end very near the ground and makes a sudden bounce high in the air. The oblong shape of an American football can make it bounce off the ground and players in very unpredictable ways. This unpredictability has the additional benefit for the kicking team of increasing the probability that the receiving team will muff the kick. To counter this, when the receiving team expects an onside kick to be attempted, it will often substitute a "hands team" consisting of players skilled at catching or otherwise securing the ball.
Traditionally, the onside kick had its own formation, in which the other ten players of the kicking team would line up on one side (left or right) of the kicker, in an effort to get as many people as possible into one area of the field. This is still popular in high school football; however, the NCAA (and later the NFL) have since added a requirement that at least four players line up on each side of the kicker. To combat this, some teams (including the Buffalo Bills, who pioneered this strategy) developed a "cluster formation" in which all of the players line up behind and immediately next to the kicker in what is effectively a moving huddle. This, too, was eventually banned in the NFL rule books with a 2009 rule change that states that "the kicking team cannot have more than five players bunched together;" the rule change has been considered a gratuitous targeting of Bills special teams coach Bobby April, as the ostensible reason for the ban (injury risk) had negligible evidence to support it.
An onside kick from a free kick is usually a desperation technique used for a kickoff by a team trailing in the score with little time left in the game, in order to gain another possession of the ball and to hopefully allow scoring again. The risk is that if the receiving team does get possession of the ball — as they usually do — they will have much better field position, meaning they will have less distance of the field that they need to move the ball in order to score. For this reason, this play is typically only attempted with very little time on the clock, when the field position advantage of the receiving team is not very important because they are already ahead and will simply focus on running the clock out and ending the game regardless of their initial field position.
Occasionally, football coaches will attempt surprise onside kicks in an effort to catch their opponent's players off guard, when they are less likely to have the putative "hands team" on the field. For instance, in Super Bowl XXX, Pittsburgh Steelers coach Bill Cowher called an onside kick early in the fourth quarter when trailing 20-10 which was successfully recovered. More recently, in Super Bowl XLIV, the New Orleans Saints called an onside kick from kickoff formation at the start of the second half and successfully converted the possession into a touchdown.
Onside kicks are generally very risky and are not often successful. Overall, between 2003 and 2006, an onside kick in the NFL was successful about 20% of the time (41 times out of 206 attempts), though there is a wide discrepancy between surprise kicks and those that the hands team expects. Among anticipated onside kicks, between the 2005 and 2006 seasons, the onside kick was 10-for-86, less than 12%. This was before the league's rules changed to eliminate stacked formations, so that number has likely gone down even further. Surprise onside kicks, however, have had more success; in 2006, more than half of the surprise onside kicks were successful. Between 2001 and 2010, surprise onside kicks were successful 60% of the time, while expected onside kicks were successful less than 20% of the time. Accordingly, some analysts have suggested that the surprise onside kick is an underutilized strategy.
Offside "onside" kicks 
There have been versions of American football that allow or allowed the kicking team to recover the ball once it hit the ground, regardless of onside or offside, and not only for free kicks. Any such kick recovered by the kicking team is often referred to as an "onside kick," even if the recovering player was in front of the kicker at the time of the kick (and thus, according to the original definition, offside.) Saint Louis University coach Eddie Cochems described this play after the 1906 season:
- "Instead of keeping the ball in the air it should be kicked to the ground as soon as the case will permit, since the moment it touches, the whole team is on-side. The longer the kicker can delay kicking the further down the field the team can get to either recover the ball themselves or form interference for the player who is supposed to recover."
In these early years and into the 1920s, all players of the kicking team except the kicker were permitted to recover the ball once it hit the ground beyond the neutral zone. Later, the rules were modified to require it be at least 20 yards downfield.
The idea of the early 20th century, XFL, and Arena rules allowing kicking side recovery on grounded balls was generally to force the receiving team to play the ball, encourage quick (i.e. surprise) kicking, and thereby loosen the defense. However, kicks have rarely been employed as offensive tactics even when these rules were present; the forward pass remains the more effective tactic to loosen and surprise the defense.