The process by which individuals learn and adopt societal norms and expectations related to masculinity and femininity.