I made a couple of vector shapes in AI and I get this strange thin border appearing around them. I can't get rid of it. Any suggestions?
Adobe Illustrator constructs objects with vector mathematics. However, it has to interpret that vector data into pixels in order to display it on the (pixel-based) monitor.
To create smooth lines on screen it anti-aliases pixels when two colors lie next to each other. It essentially "blends" the two colors together over a pixel or two in order to represent their position.
Sometimes this anti-aliasing isn't entirely smooth if your monitor is not capable of high quality rendering. Therefore you get a small, off-color, hairline, edge with some objects.
This hairline will generally disappear if you uncheck Anti-Alias Artwork in the preferences. It will also disappear if you print the artwork or export artwork using the "Art Optimized" anti-alias setting.
This small anti-aliasing pixel is generally nothing to be concerned about.
Firstly, you're VERY observant ;)
I'm guessing you're working on a document that is in CMYK colour mode?
How you tackle it depends on your purpose. If you are creating print graphics then you can safely ignore it, because it's an artefact of how Illustrator renders the CMYK color model on screen.
If you're creating graphics for screen, switch to RGB – the line disappears.
File > Document Colour Mode > RGB Color
This is where I've kicked myself before for not starting out in the right color model, because some colors will change significantly – for example the CMYK black will convert to an RGB dark gray (like RGB 35,31,32). Depends on your artwork and you're mileage may vary.
There is one other way to get rid of the line, and this is definitely not advisable for print artwork, but say you're making an application icon or whatever, and you need this problem solved, do this: edit your black to be a super rich black: (C100, M100, Y100, K100).