If one desires to learn about Islam and take part in Islamic community events and lecture, then they are free to do so and it is generally heavily welcomed among the Muslim community.
If one desires to become Muslim, then all they need to do is give the
Shahada with sincere intention of wanting to become Muslim and practice Islam, no witnesses are needed:
أَشْهَدُ أَنْ لَا إِلَٰهَ إِلَّا ٱللَّٰهُ وَأَشْهَدُ أَنَّ مُحَمَّدًا
ašhadu ʾan lā ʾilāha ʾilla -llāhu, wa-ʾašhadu ʾanna muḥammadan rasūlu
"I bear witness that there is no deity but God, and I bear witness
that Muhammad is the messenger of God.
If one who joins Islam desires to leave, they can leave Islam as Allah has given us all free-will and the ability to think for ourselves.
There is no reliable evidence that the Prophet ﷺ ever executed anyone for apostasy, as was observed by the famous scholar of Cordoba, Ibn al-Ṭallāʿ (d. 1103). When one of the Companions, ʿUbaydallāh bin Jaḥsh left Islam and became Christian while the Muslims were seeking refuge in Ethiopia, the Prophet ﷺ did not order him punished. The Treaty of Ḥudaybiyya, which the Prophet ﷺ concluded with the Quraysh, stated that if anyone decided to leave the Muslim community in Medina no harm would befall them. There was no mention of a punishment for apostasy. In fact, when a man who had come to the Prophet ﷺ just the day before to pledge his loyalty to Islam wanted to be released from his oath, the Prophet ﷺ let him go.
The Issue of Apostasy in Islam
But it is seen as haram, heavily discouraged, and disliked since Muslims should always try to clarify their concerns and questions and shouldn't give up on the truth, their faith, too easily. It's okay to have questions and be confused, it happens to the best of us.