Answer:
Astronauts and cosmonauts effectively do the same job, but the difference in their job titles is mainly down to who they're trained up by.
Astronauts are people trained and certified by NASA (National Aeronautics and Space Administration), ESA (European Space Agency), CSA (Canadian Space Agency), or JAXA (Japan Aerospace Exploration Agency) to carry out professional work in space.
Cosmonauts on the other hand are people specifically trained by the Russian Space Agency to work in space. There are also taikonauts, which are Chinese astronauts!