A carbine is a short rifle, with a barrel length of less than 16 inches. Carbines tend to have slightly shorter effective range than their rifle counterparts, due in part to the shorter barrel and the resulting shorter sight radius.
Historically a carbine was a shortened version of a parent rifle designed for troops such as horse cavalry who could not effectively employ a full-length weapon. However, over the last century a number of dedicated carbines with no parent rifle such as the M1 Carbine were produced, and in modern terms "carbine" is only a reference to the length of a rifle's barrel, and not necessarily indicative of its status as a derivative of a full-size rifle.
Due to the lack of any other appropriate term, a semi-auto derivative of a submachine gun is generally also called a carbine.