new allocates memory on the heap at runtime and returns a pointer to it, while delete frees that memory.