What version of AE are you using and on what OS ?
Basically AE cannot write your file because it's already been used by another program. It could be locked by Quicktime, or maybe locked by your antivirus, or Time machine, or Even AE if the file is opened in your project.
It also can be locked because of file/folder permission (even if you are an administrator on Vista for exemple, your software cannot write file to some places without running them in Administrator mode, by rightclicking on them and selecting "run as admin").
Try to close any application that could be using your file, and try to export your file to another directory with another filename.
As Sébastien said, something is locking your files. could be anything from virus scanners to automated backup and versioning systems such as Time Capsule on Mac. as a minor, try to save it to a different location and look into the configuration of aforementioned tools.