You may not think a city like New York would have much by way of mountain biking, and while you'd be partially right (there isn't much in Manhattan, and none of it is legal to ride), there are some great, truly well-designed options just over in Queens. And if you head north of the city, or just into New Jersey, the possibilities are endless.
If you're just training for the day, head to Queens and link up Alley Pond Park's trails and nice, winding pavement road into the park (hill repeats!) to Cunningham Park, where IMBA has done a truly inspired job of creating fantastic trails for all ability levels.
For more challenging singletrack, head north of the city on the Sprain Ridge Parkway to get to Sprain Ridge Park where the track is so technical that even the most skilled mountain bikers get a serious education. If that's not enough for you, Blue Mountain Reservation is just another 20-30 minute drive north and will provide you with even more intense single track that's a bit more flowing and more beginner-friendly.