There have been some rogue Facebook applications that are being used to gain access to information on individual's profiles.
The latest one has now been blocked, but I'm sure there will be more to follow: Security concerns over latest rogue Facebook app.
The controls put in by Facebook to protect against these are that a user needs to agree what level of access they are willing to give the application. This means that applications that have a genuine need can interact with your Facebook wall, but it also means that other less reputable applications can add things that your don't want or access your profile information if you allow them.
To avoid this you should only allow applications that you trust to access your profile. You should also look at what the application is asking for access to and check that is appropriate to the application. In any doubt then don't give them access.
What is particularly annoying at the moment are the pages that promise to show you a great video that 99.9% of the world think are great, but won't allow you to see them until you click "like" on the fan page. These then update the users wall pretending to be a comment from them. As a friend you may think that your friend actually wrote the comment themselves when in reality it is from the application.
In reality the videos are rarely worth clicking on, but if you don't want to miss out then there is a site that will send you to the video without having to first like the page. The site is www.bypassfanpages.com
If in doubt don't give access and don't click Like against something you've not actually seen to decide whether you like it first..