Are you trying to AirPlay from YouTube?
Unfortunately YouTube have disabled AirPlay on their iPad mobile site, by changing the video player. I don't know why they did this but it's very annoying.
A workaround is to use the desktop YouTube website on your iPad. You can do this by clicking "Desktop Version" in the left hand menu bar on the YouTube homepage, or by typing www.youtube.com/?nomobile=1
If it's not just YouTube, if you can't AirPlay videos from other sites (like Vimeo) or AirPlay music from the Music app, ensure the iPad is on the same wifi network as the Apple TV. If your iPad is connected to the internet over 3G, it can't communicate with the Apple TV.
Also check that AirPlay is enabled in the Apple TV settings.