Deutsch is a noun (and nouns always have a capital letter). It is the German language. E.g. Ich spreche Deutsch ("I speak German").
deutsch is an adjective (and adjectives are normally lower-case, but capitalised at the beginning of a sentence or in a name) and is used to describe something that is German. E.g. Die Schokolade ist deutsch ("The chocolate is German").
Later, Duolingo teaches us that adjectives need an ending when they are put in front of nouns (called inflection of attributive adjectives). E.g. Die deutsche Schokolade ("The German chocolate"). Or, the names of some German organisations: Deutsche Bahn, Deutsche Bank. The ending is not always -e, but Duo teaches that later.
Exactly. The Germans have another word, 'studieren', which means 'to study,' but only in the sense of "I'm going to school to study medicine." You wouldn't use 'studieren' in the sense of 'study for a test.' That would be, like you said, 'lernen.' It's an important distinction to make.