Nail lifting occurs when the nail separates from the nail bed due to trauma, such as stubbing your toe or wearing tight shoes.