A referral code is a unique code provided by a platform or service that allows users to invite friends to join and earn rewards. When a new user signs up using a referral code, both the referrer and the new user receive a benefit, such as a bonus, discount, or reward.