Yes and no. The vagina is a very compliant organ, with a remarkable ability to stretch to accommodate the delivery of a full-term baby. That said, is it going to be exactly the same after giving birth? Probably not. But, in due time, the vagina usually regains its pre-pregnancy shape and muscle strength. And remember, exercises like Kegels may also help things out down there, so if you’re worried, be sure to routinely squeeze in some exercises when you can (during pregnancy and after).
As for how it will function during sex after delivery, most women don't really experience any huge difference or permanent issues in terms of pain or discomfort during sex after a vaginal birth. Still, doctors recommend avoiding sex for at least six weeks after birth, so the vagina can heal. But remember: This doesn't mean that everything is going to be back to normal at six weeks. It can take up to six months to a year sometimes for the vagina and pelvic floor to heal fully after vaginal birth, so keep that in mind. Every case is different.