I don’t have any good photos of mine, but there are several different ways you could build them. The one on my main coop is hinged, on my grow-out coop it’s a guillotine-type door. I’m sure others do different things.
Some people put them on some type of system that closes at a certain time automatically, some have them so they can close them without going into the coop or run. I personally go in and close mine manually and manually put a closure on it. I use an S-biner I got from Lowe’s but others use padlocks, carabineers, snap locks, or some other method to lock them in place. If you use an electric motor the motor may be strong enough to hold it closed. Maybe. Some people just trust to gravity. There is no one right way to do this where every other way is wrong. A lot of it has to do with your comfort level.
How secure are they? I think mine are really secure. I used robust hardware and materials. They are securely screwed in place with plenty of long screws. When I framed them out, I used robust materials and attached those so I have something firm to attach to. Mine are also inside a fairly predator resistant run. The run is not absolutely predator proof, flying predators can come in. I could see a climbing predator like a raccoon or bobcat maybe working their way in, but it would be a circuitous route as long as my electric netting is working.
When do you open and close them? There is the question with no good answer. Contrary to popular opinion, many predators are active day and night. The risk is greater at night. Some are more active then and they typically have more undisturbed time to work their mischief. Dusk and dawn are highly dangerous times. The predators either wake up hungry or had a bad hunt and are desperate to not go to bed hungry. Bobcats, foxes, coyotes, raccoons, skunks, especially dogs, and others are a risk around the clock but nighttime is your greatest danger period.
My coop is oversized for the number of chickens so I’m not in a rush to let them out in the morning. My schedule usually allows me to wait until 8:30 or 9:00 before I let mine out. A lot of people don’t have that luxury. I typically lock them up fairly soon after they put themselves to bed. Some nights however, I may be way late locking them up, sometimes 10:30 or 11:00 when I go see a play for example. That’s only been a problem once. An owl flew into the electric netting area, walked into a third coop I was using for juveniles, and drug one out. There have been other nights, such as at daylight savings time change when my routine is messed up, that I’ve left mine unlocked all night. That’s generally not a problem but it is certainly a risk.
I have no idea what your set-up looks like, how secure the area around your pop door is, or what kind of predator pressure you have. You might be able to go years without a predator attack even if you don’t lock them up at night. You might be wiped out the first time you try that. You really don’t know when one is going to come around and test your defenses.
I don’t think there is an easy answer to this. Predators are a risk. How precious are your chickens to you and how much risk are you willing to take?