Happens all the time. If a person commits a crime against country A and they are in country B, country A may well ask country B to hand them over. If it happens or the details of it vary based off of the specific countries and their treaties, called extradition treaties. For example the US and North Korea? Ya not happening. There are no extradition treaties between those two, and the governments hate each other. so nobody is getting handed over. However EU nations? Extremely strong extradition treaties. If you commit a crime against Germany from France, Germany will have France arrest you and ship you over to stand trial.
The majority of nations have extradition treaties of some level with each other since they don't want criminals able to run off and hide from justice. It has been a thing for a long time.