Upcasting and downcasting are two types of type casting in Swift. Type casting is the process of checking the type of an instance and treating it as a different type within a class hierarchy. Upcasting is when you cast an instance of a subclass to its superclass type. This is always safe and doesn't require a runtime check, because a subclass is guaranteed to have all the properties and methods of its superclass. When you upcast, you can only access the properties and methods that are defined in the superclass, not the ones that are specific to the subclass.