It happens that a day before departure there are some booking cancellations or if the plane is not fully booked, some cheap seats may appear for sale. If you are lucky, they can be yours at the very last minute. But keep in mind check-in closing time for the flight as no tickets can be bought after that.
A ticket to more distant destination may cost you less than a transfer point or a closer destination. A fare from your departure country may be higher of lower than from your neighbour country. This is due to competition among airlines. So if you are flexible, check similar itineraries before you buy a ticket.
Airlines have special agreements with other airlines for special fares for special flights that can be added to the main ticket. Such add-on tickets you cannot buy online and have to contact your airline directly. For some destinations such combination may result in a cheaper fare to the final destination than the regular one or even separate tickets.