Sometimes a WordPress plugin you are writing extends the functionality of another plugin or simply relies on it to work. In these cases, you need to make sure the plugins your plugin depends on are installed and active to be sure you can use their functionality.
There are some existing libraries that you can use to make sure that a plugin is running – one such library is TGM Plugin Activation. Checking if another plugin is running, however, is fairly simple and you can implement it yourself if you don’t want to pull an external library into your project for the purpose.
UPDATE (April 2020): Since publishing this article in October 2018, I have updated the plugin code and moved the entirety of it to a GitHub repository for ease of access and improved readability. I have also updated this article to only include the key points of the implementation, leaving housing the rest of it to the repository.