The new operator allocates memory on the heap and returns a pointer to it. Write int* p = new int; to allocate space for one integer. The pointer p holds the heap address. You can initialize during allocation: int* p = new int(42); sets the value to 42.
For objects, new calls the constructor: MyClass* obj = new MyClass(args); Memory from new stays allocated until you call delete. If you lose the pointer without deleting, that memory leaks.
Every new needs a matching delete somewhere.