(This reply is according to the Shi'a view)
In Islam people should not be forced to accept the religion:
لَا إِكْرَاهَ فِي الدِّينِ ۖ قَد تَّبَيَّنَ الرُّشْدُ مِنَ الْغَيِّ ۚ
فَمَن يَكْفُرْ بِالطَّاغُوتِ وَيُؤْمِن بِاللَّـهِ فَقَدِ اسْتَمْسَكَ
بِالْعُرْوَةِ الْوُثْقَىٰ لَا انفِصَامَ لَهَا ۗ وَاللَّـهُ سَمِيعٌ
There shall be no compulsion in [acceptance of] the religion. The
right course has become clear from the wrong. So whoever disbelieves
in Taghut and believes in Allah has grasped the most trustworthy
handhold with no break in it. And Allah is Hearing and Knowing.
According to this verse humans should be free to select and accept their religion.
Also according to this verse conquering other countries by sword to force them to embrace Islam is not an Islamic act but some (apparently) Islamic kings and caliphs did it in the name of Islam.
As for the death penalty in Islam, mujtahids have different views but they mostly only consider it in very rare cases.
If one wants to leave Islam there is no need to declare it publicly for everyone to know. Also, there are different types of murtad (i.e. apostates, Muslims who become non-Muslim) and each type has different rules. The murtad who have political opposition to Islam and make movements against an Islamic government are considered the most severe, and even then such a person is not executed except for very rare cases and with many terms. In the court he is asked 3 times to repent and if he accepts he will be free. Only in very rare cases, if he himself insists to be killed (e.g., by not repenting even if by lying,) he will be executed. Female murtad will never be killed, and neither will nationals who are murtad (only if it is a foreigner). Anyone who leaves Islam based on propaganda shouldn't be killed. Unless he declares it publicly.
In the past 30 years I have seen only 2 or 3 cases, one of them being Salman Rushdie who wrote a Book insulting prophet Muhammad (PBUH) as well as Aisha and the Sahaba, in which the death penalty was prescribed, and even then he is still alive.
This is mainly according to the situation in Iran; it also depend on the laws of each Islamic country, which may be made based on different schools of Fiqh and sectarian beliefs. For example, a country like Saudi Arabia has much more severe rules about murtad, and even someone who converts from the Wahhabi sect of Sunni Islam to Shi'a Islam may be imprisoned or beheaded by the sword.
In fact the goal of this rule is not to kill apostates, so much as it is to prevent them from declaring it publicly in an Islamic society. If he does not declare it, he will have no problem.