If the below appear while running the selenium scripts,
Failed to start: SocketListener0@0.0.0.0:4444
you need to kill the process "javaw.exe" by going to the task manager
If this is a routine case then you can write a reusable function and call it wherever required