Praise be to Allah.
What it means to bear witness that there is no god except Allaah is to deny that anyone other than Allaah has the right to be worshipped, and to affirm that this is the right of Allaah alone, with no partner or associate. Allaah says (interpretation of the meaning):
“That is because Allaah He is the Truth (the only True God of all that exists, Who has no partners or rivals with Him), and what they (the polytheists) invoke besides Him, it is Baatil (falsehood). And verily, Allaah He is the Most High, the Most Great”[al-Hajj 22:62]
So the words laa ilaaha (there is no god) deny all things that are worshipped instead of Allaah, and the words illa Allaah (except Allaah) affirm that all kinds of worship are for Allaah alone. So what they mean is that there is none that is rightfully worshipped except Allaah.
Just as Allaah has no partner in His dominion, so too He has no partner in His worship.
What it means to bear witness that Muhammad is the Messenger of Allaah is tobelieve firmly, from the depths of one's heart, and express it on one's lips, that Muhammad is His slave and His Messenger to all of creation, mankind and the jinn alike. That means believing what he has told us about events in the past, what he has told us about things that are yet to come, what he has permitted of halaal things, what he has forbidden of haraam things; and it means obeying and following what he has commanded, and giving up and avoiding what he has forbidden, following his laws, adhering to his Sunnah in secret and in the open, accepting and submitting to his judgements, and knowing that obedience to him is obedience to Allaah, and disobedience to him is disobedience to Allaah, because he is the one who conveyed the Message from Allaah, and Allaah did not cause him to die until He had perfected the religion, and he conveyed it clearly. May Allaah reward him on behalf of us with the best reward that was ever given to any Prophet on behalf of his people and any Messenger on behalf of his nation.
A person can only enter Islam by uttering this twin testimony of faith; its two parts are intertwined and cannot be separated. For the conditions of testifying that there is no god but Allaah are the same as the conditions of testifying that Muhammad is the Messenger of Allaah. These, along with the evidence for them, are mentioned in questions no. 9104 and 12295.
And Allaah knows best.