There's a chinatown bus from Chinatown in NYC to Chinatown in Philly for $20 roundtrip (or I think $15 one way) - It's a shady way to go, but the buses are cheap and in pretty decent condition (Two-2.5 hours depending on traffic). Alternately, you can take the Septa/NJ Transit trains that ICC mentioned from Penn Station, transferring in Trenton (the last stop on the line) to the Philly train right in front of the train you get off. Last time I took it I think it was around $33.50? roundtrip and like $19 one way. You can check the scheduled times on NJ Transit's website, but it runs really frequently and takes you to 30th Street Station in Philly. Depending on where you're staying you could also get off in Philly at Suburban Station (17th and JFK) or Market East (11th and Market). There's also a greyhound bus from NYC"s bus terminal at 42nd and 7th avenue but it's about the same cost as the train if not a little more.
The expensive (yet fastest) way to go is Amtrak which (last time I took it which was awhile ago) cost $56 one way. It's faster assuming that Amtrak doesn't have delays which is always a dubious conclusion and also takes you to 30th Street Station.