Let's go over the commands posted in the OP just so people are clear what they do:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
1) sudo - this is the dangerous part because it allows the user to execute the commands following it as root. The root or Super User account has no limitations on what can be done to a Unix system. In general, it is a bad idea to run sudo based commands found on the internet if you don't know what they do. The Apple boiler plate when you invoke sudo the first time is meant to scare you away from using it to limit the number of support incidents they have to handle. sudo is vital to the proper use and administration of a Unix system.
2) launchctl - controls the settings for launchd which automatically starts and stops processes. Typically, these processes are started during boot and stopped during shutdown, but this command can start or stop them. launchd continually runs and checks to see if processes that should be running actually are, and will restart them if needed.
3) unload - this is a subcommand of launchctl that tells is to take the following process out of the list of processes that are to run while the computer is on.
4) -w - an argument to launchctl that overrides a previous setting so the unload is actually done.
5) /System/Library/LaunchDaemons/com.apple.metadata.mds.plist - the Unix path to the file that is unloaded. The plist contains info about the mds process that launchctl uses to run it. The file has a setting called 'Keep Alive' that means launchd will continuously check to see if mds is running and restart it if not.