Optional.MindSpark is a heuristic description for a Potentially Unwanted Program (PUP). PUPs are undesired tools and applications that infiltrate systems without the user's consent, usually bundled within the installation process of freeware or other popular programs that people download and install from untrusty sources.
One of the main functionalities of the PUPs is to generate and display on the user's desktop intrusive advertisements, like pop-ups, banners, fake security alerts or discount codes. However, most of these potentially unsafe tools also install various unknown browser extensions and modify the browser's settings to replace the homepage and default search engine with their own URL, forcing users to visit questionable websites and redirecting searches to irrelevant pages and products. Another feature that is a serious threat to users' privacy is the ability to track browsing data.
You can avoid PUPs by always opting for the Custom/Advanced option when installing programs. Also, download software from the developer's official website only and never use third-party pages. If you suspect your system is infected with a PUP, run a professional anti-malware scan to detect and remove any potential threats.