The purchaser in the situation you describe is the Saudi (for example) national government. The seller is a private company such as BAE systems.
However the British Government is deeply involved. The government has to provide export licences, so the Saudi Government negotiates with the BAE (who say what they can make and at what price) and with the British Government (who decide what can and cannot be exported). These negotiations have a combination of business and politics.
Several areas of government can be involved: The Foreign office is often the lead negotiators, as they have diplomats who know the customers best. First contact is made via the embassies. The department for trade and industry, who know the suppliers and the department for defence, who obviously understand the military implications of a trade are also involved. Other departments can also be involved, including the Prime Minister.
If the weapons that are sold incorporate component from other countries, then that country may also have the right to limit reexport of the weapon system. The negotiations can become very complex.
There are sometimes direct sales of military equipment between governments. For example, the USS Phoenix was sold to Argentina and renamed the General Belgrano (before being controversially sunk in 1982). And other countries have nationalised arms manufacturers, in which case the government is both negotiator and seller.
Since 2014 there has been an international arms trade treaty 92 countries have ratified or acceded to this treaty (including the UK but not the USA). It requires transparency and restrictions on arms exports to conflict zones.