Learn Resource Acquisition Is Initialization.
The technique was invented by Bjarne Stroustrup, to deal with resource deallocation in C++.
[...]
RAII is vital in writing exception-safe C++ code: to release resources before permitting exceptions to propagate (in order to avoid resource leaks) one can write appropriate destructors once rather than dispersing and duplicating cleanup logic between exception handling blocks that may or may not be executed.
C++ is an object-oriented language with features like inheritance, encapsulation and polymorphism that is also found in popular languages like Java, C# etc. C++ also features generics via templates. However, in C++ you have to explicitely handle memory deallocation (ie. no garbage collection). This makes it very important to be able to release resources and deallocate memory in a controlled manner, and that is why I believe RAII is a very fundamental concept in C++. You will have a hard time understanding a "smart pointer" unless you understand RAII.