Topological concept, initially introduced in particle physics, brought new excitements to many other fields of physics such as topological insulators, ultracold atoms, and topological lasers to unveil various robust states therein. In nanomagnetism, the most prominent example governed by topology is the magnetic skyrmion. The magnetic skyrmion is topologically nontrivial spin texture. Therefore, it has sparked considerable interest due to the academical interest and the prospect of employing the skyrmions as the nanometer-scale non-volatile information carriers. Although profound the concept is, the realistic situation that magnetic moments are localized in a discrete atomic lattice raises an immediate question of whether the topological concept is still viable in the real system. Despite the fundamental importance, the thorough assessment has remained elusive due to the challenge of controlling topology, and thereby directly comparing the topologically nontrivial skyrmions and trivial bubbles in a single specimen. Here we report how to manipulate topology and how robust the magnetic skyrmion structure in comparison with the stability of topologically trivial bubbles for the first time. By measuring the lifetimes of both skyrmions and bubbles in the same specimen, we found that magnetic skyrmion exhibit far longer lifetime (Fig.1), directly evidencing the topological effect in a real discrete system. Our results corroborate the physical importance of the topology in the magnetic materials and open up a versatile route towards the topology manipulation, which will facilitate the implementation of ever-stable nanometer-scale magnetic devices.