An Interline agreement (both pax or cargo) is normally either a bilateral contract between airlines or a multilateral cooperation, like the IATA Multilateral Interline Agreement (MITA - IATA Resolution 660). In an interline agreement, the airlines set rules for the mutual recognition of tickets or Air Waybills, for liabilities and for administrative provisions. Basically, an airline that enters an interline agreement with another one states that they will accept each others tickets.
On top of this basic interline agreement you need two further agreements :
1) a settlement agreement, where it is stipulated how the open amounts between airlines will be invoiced/settled. This can be e.g. via direct billing between the carriers or via the IATA/ATA Clearing Houses which balance the invoices of each airlines against each other.
2) a Prorate agreement. This defines the amount of money or the share of the total journey price is given to which partner. Again there are several possibilities : This can be a participation in the IATA Multilateral Prorate Agreement which splits the revenues according to certain published proration factors (basically comparing the lengths of the concerned sectors and put them into relation) but it can also be a bilateral special prorate agreement where the airlines either negotiate their own proration figures or even net rates which are charged on a flat basis for a certain sector.
An interline agreement can be considered as a very loose form of an alliance. In some cases it forms the first step of such an alliance, followed by codeshare flights etc.