First don't tell only "it is giving error message", but give the exact text of the error message. Be also precise as to what commands you have used exactly to install the themes.
If the problem is caused by a kdm theme, and you can log in as root to a console, search for the kdmrc file (on my machine it is located in the /usr/share/config/kdm/ directory, but it can be elsewhere for you).
Make a backup of it (cp kdmrc kdmrc.bak), then edit it from :
(the '...' means other options there)
Save and restart.
"how to uninstall those themes" : as you didn't say how you installed them, it's difficult to answer. If you reverse what you've done that should do it.