Apple - How can I make iPhone silent for a specific amount of time?

While time-limited muting does exist on Android, it does not on iOS. You can set your phone to silent (by using the mute switch on the side of the phone), but you can't set it to silent for N hours. This feature could come in a future software update (try suggesting it to Apple) but can't come from an app, as iOS apps are forbidden from controlling ringer volume or Do Not Disturb setting.

You can, however, set DND to come on for a specific time period every night, having it automatically turn on at 10pm and turn off at 7am, say (times are customizable). That's in Settings->Do Not Disturb->Scheduled.

Scheduled DND

Source of information about apps not being able to control ringer volume: my personal knowledge as a published iOS developer and this answer.