To be more specific, str is a type that represents a string of characters in memory, regardless of how they got there. String literals (expressions like "my_str") are stored alongside the program and are essentially a part of the program itself, so their lifetime is the 'static lifetime -- the lifetime of the whole program. Therefore their type is &'static str.
The type String, on the other hand, is a string type that owns the str it represents, so it can also change its contents, or pass them on to someone else. The downside is that it requires dynamic allocation of memory, i.e. memory from the heap.