I'll assume you mean Safari, but the same would apply to any application, browser or otherwise.
To put an icon (actually an alias) into the dock, simply click & hold on the application and drag it to the dock. It will place the alias there without actually moving the application.
You already found out how to remove the alias.
You can also rearrange the aliases by clicking & holding and move to location deasired.