Unless you are Muslim you cannot enter the mosque, although you are able to enter the courtyard.
You must be Muslim to enter the mosque.