When you test, you can do this by removing one and installing the other. However, if you intend to release two applications (or any number of applications) on Google Play, you should always have different package names for each.
The way the Google Play engine works is that different applications can have the same name. However, they differ from each other in the names of their packages. Two apps on the Google Play Store cannot have the same package names.
Here is a good article called Things That Can't Change From Dianne Hackborn.
Of course, use this ( as Nunu already answered ) to change the package name of your second application: Right-click on the project → Android Tools → Rename the application package
source share