Create unique_ptr with make_unique: auto p = make_unique(args);. This allocates the object and wraps it in one step. It's exception-safe and concise. You can also construct directly: unique_ptr p(new int(42)); but make_unique is preferred.
It prevents subtle bugs when multiple allocations appear in one expression. Access the object with * and ->: *p gives the value, p->method() calls methods. The unique_ptr acts like the raw pointer it wraps but with automatic cleanup.