To get into Yellowstone National Park you need to buy a park pass and you can buy it as you get to the entrance of the Yellowstone National Park.
To enter Yellowstone National Park you pay $25.00 per vehicle for a park pass which is good for 7 days.
If you want you can buy a park pass for Yellowstone that will last you an entire year for $50.00 or buy a national park pass that gets you into all national parks in the country for $80.00 per year.
If you want to camp in campsites such as in a tent it can cost as little as $15.00 per night or $25.00 to $50.00 per night for camping in an RV or Travel Trailer in Yellowstone RV sites.
Yellowstone National Park does allow RV's and Travel Trailers in the park.
In Yellowstone National Park they have campgrounds dedicated to parking RV's and Travel Trailers where you can pay a daily fee and have electricity and water.
If you want to camp in your RV or Travel Trailer somewhere else in the Yellowstone National Park then you can usually do so because I've seen a few campers and other RV's parked elsewhere away from the RV parks in Yellowstone.
You just won't have your electricity or running water but you can have your water tanks filled and use that and possibly use a generator during the day when dry camping in Yellowstone National Park.