We can define formula fields that reference related objects (from child to parent only, not vice versa). They are called cross-object formulas.
The following is an example of a custom formula field that shows the case's subject on the case detail record:
Case__r.Subject + '(' + Case__r.RecordType.Name +')'
This formula field will display the parent case's Subject field and the case record type's name:
Think about the account's Parent field. You can create a hierarchy of accounts and you can reach into a custom formula from a child Account to the fields of a parent Account that is the fourth parent.
This means that if you have 15 different lookups on a given record, you can reference at most 10 different object types in the child object formulas. This limit applies to formula fields, but also formulas on rules (such as workflow rules or validation rules) and lookup filters.