Yes it can happen. Usually reserved for PC’s, pop up programs and hijacking can occur with a Mac too. Typically this is caused by inadvertently downloading and installing a “Sister” program to an update or installation of downloaded software. Extensions get installed within the browser, Safari or Chrome for example, that causes your online experience to become bogged down with scanning software, advertisements or being sent to another web site.
To resolve the issue, click on the Safari Menu and then Preferences. Click the Extensions tab and choose the extension you want to uninstall. Highlight that one and click Uninstall. Next change the Home Page to the desired web site. Go to the web site you want as your Home Page. Click the word Safari, then click Preferences. On the first page, click to make the current page your default. Done.
In Chrome, click on the three bars in the upper right corner, then click on Settings. Click the greyed out Extensions link on the left side of the screen. Click the trash can to remove the associated extension. Click on the setting link. Click the third option under On Startup. To change the Home Page, make sure you are at the site you want as the Home Page, click the blue link, Set Pages. Click to use the current page button. Done.