Without knowing your settings, details about your footage, screenshots of how it looks and so on nobody can tell you much. Just saying that it doesn't look as you want it to is not useful to anyone.
Keying is not an automated process but a careful consideration of many parameters. in keying, getting good edges is everything and hair especially. you situation could be avoided in a large number of procedures, or not at all. it's anybody's best guess without a proper screenshots and a full view of the parameters you already set + your footage at it's maximum quality. so you can start by providing these.
from your question, I will take a guess you are fairly new to keying and this means you have to learn how it works and practice. first start here: Keying in After Effects. I would also recommend this course to get a comprehensive understanding of how keying is done in after effects: After Effects Compositing 04: Color Keying