First, your bird has to be a female. Many female birds lay eggs even without a male bird present. This is not at all unusual. In fact, when people at the store ask us if a bird is male or female, we usually say "if it lays an egg, it’s a female.” I have heard many, many stories of people who have a "boy” bird until one day she lays an egg! Nicodemus the Senegal became "Miss Nicodemus” the Senegal, and Charlie the male cockatiel became Charlie the female cockatiel. Most parrots cannot be sexed visually, as they do not have external sex organs, and males and females look the same in many species. Species that can be sexed visually include adult normal grey cockatiels (juveniles all look like females, and color mutations all look different), adult budgies, parrotlets, and Eclectus, to name a few. There are trends for sexing based on feather or eye color in other species (certain cockatoos, many Poicephalus species, etc.), but these tend to be much more variable.
A bird only has one "exit hole” for their body, called a cloaca. Their droppings and, for females, eggs both come out of here. This also means that a bird that is laying eggs may be "blocked up” for a little while, and frequently has an abnormally large poop after they lay an egg. Eggs are fertilized internally before they are laid, so an egg laid by a single female bird cannot be fertilized after the fact.
Female birds technically have two ovaries, like humans, but typically only the left one develops (with the exception of some raptors, who develop the right one). An egg starts out as a simple bundle of cells with a coating of yolk, which is the "food” source for a developing embryo. It then receives a coating of albumen, or egg "white.” The shell is added last, in the uterus, after the egg is full-sized. Once it has a shell it moves towards the cloaca for laying.
Want to learn more?
Egg-Laying Problems In Birds
My Cockatiel Laid An Egg, Now What?