"The woman is in the restaurant."
Translation:Die Frau ist im Restaurant.
You can’t separate the preposition (in) from the noun (dem Restaurant). “In dem Restaurant ist die Frau.” would be correct: There would be an emphasis on the fact that the woman is in the restaurant and not anywhere else. The most common variant (withou emphasizing anything) would be “Die Frau ist im Restaurant.” though.
Because the word “im” is a shorthand for “in dem”, thus it already includes the definite article. If you say “im den”, you state the article twice, which is not correct. Moreover, the preposition “in” in the meaning of being in some place is expressed by a dative, which is “dem” for a masculine singular, not “den”. “Den” would be an accusative, which is not appropriate in this case.
Several reasons. I've tried to be precise, so the second part may take some effort to parse correctly. Recommend googling the four German cases for more information: "Nominative, Accusative, Dative, Genetive".
First, 'im' = contraction of "in dem" = "in the". Hence, "im das" is an [incorrect] attempt to say "in the the".
Second, 'das' is the neuter gender definite article 'the' for both the nominative and accusative cases. In this sentence, 'the restaurant' is an indirect object, and therefore in the dative case. Both the masculine and neuter gender definite articles in the dative case change to 'dem'.
The nice part is that German grammatical rules are much stricter than English (where every rule has an exception, including this one). Once you have a strong grasp of the three genders and four cases, the major challenge will be vocabulary (esp learning genders for each noun) and idioms.