From Wikipedia

The International Telecommunication Union (ITU) allocates call sign prefixes for radio and television stations of all types. Amateur radio operators have since 1927 been allocated unique call letters (call sign) to uniquely identify them, as well as locate then within a geographical region of the world - usually a country.

Prefixes are assigned internationally, and a separating numeral plus suffix are added by a national body to produce this unique identifier. These prefixes are agreed upon internationally, and are a form of country code. Each country must only assign call signs to its nationals or operators under its jurisdiction that begin with the characters allocated for use in that country or its territories.

Call signs meant for amateur radio follow the ITU’s Article 19, specifically 19.68 and 19.69.

Prefix Region
VK Australia
PY Brazil
S5 Slovenia
OK Czech Republic
EA Spain
OH0 Åland Islands
HB9 Switzerland
ES Estonia
OZ Denmark
OE Austria
EI Ireland
LU Argentina
HS Thailand
A,K,N,W United States
PA Netherlands
SV Greece
I Italy
ZS South Africa
JA Japan
EA8 Canary Islands
YL Latvia
SP Poland
ON Belgium
LA Norway
OH Finland
DL Fed. Rep. of Germany
LY Lithuania
G,M England
CT Portugal
TA Turkey
F France
UA,RA Russia
ZL New Zealand
5B Cyprus
VE Canada