Ok, so given your comment, I think it's safe to assume that your APT is caused by long periods of sitting. Luckily, there are many things we can do to correct this, that doesn't necessarily require going to the gym, but doing so is a bonus.
Identifying anterior pelvic tilt (APT)
I think it's wise to understand the cause of sitting-induced APT.
What tends to happen is that with a 90 degree bend in your hip, your hip flexors get shorter, which is called an adaptive shortening.
Adaptive shortening is muscle tightness caused by a muscle being forced to remain in a shortened position for a prolonged period of time, being unable to lengthen due to the relaxation of the antagonist group. The antagonist group to the hip flexor would be the gluteus (butt) muscles.
Chain of causality
If your hip flexors are shortened, this means that when you get up, the front of your pelvis gets pulled down further. It then rotates, and the back of your pelvis gets pushed upward, giving that "Donald Duck butt" effect, with a more pronounced arch in the lower back.
This can further cause back pain due to compression of the lumbar spine, and with back pain comes neck pain, headaches, and a plethora of other symptoms.
It's important to treat the root cause of it, rather than try to treat the headaches with medicine that gives you an upset stomach. Suddenly you're getting anti-nausea medication because of a pelvic tilt.
I always like to mention this, because often a doctor will prescribe medication for a symptom, rather than find the root cause of the problem.
Anyway, back to the APT
There are lots of things you should and shouldn't do.
The antagonist muscles
First off, it's important to note that your hamstrings and gluteus muscles are the antagonist groups of the hip flexor. Whenever the hip flexor pulls the front of the pelvis down (and the rear of it up), you want your hamstrings and butt to pull the back of the pelvis down, to counter-balance the tilt. This means that you should train the hamstrings and gluteus a little bit extra.
For the time being, you should also avoid stretching the hamstrings, because if you stretch them, they allow the hip flexor to pull even more.
A lot of people will feel like they have tight hamstrings, but that's because they're working overtime to counteract the tilt. Stretching them is like telling them to stop trying to do so. Instead, you should be training them and making them more capable of undoing the tilt.
A lot of ab exercises involve pulling your knees up toward your torso, or vice versa. Unfortunately, this has a tendency of being very hip-flexor-centric, and what you could be doing is strengthening the hip flexor and making it even more able to tilt your pelvis.
Also here, I suggest laying off those particular ab exercises, or at the very least follow it up with a good long round of...
Ok, so I've mentioned that even though your hamstring may feel tight, this is because they're trying to counteract the pelvic tilt. Instead, you should be stretching the hip flexor. Often. Very often, in fact.
Here's a list of things you can do during a day of sitting that requires no equipment.
Whenever you can, get up and walk around. Sitting for long periods of the day isn't necessarily the end of the world, but sitting for many hours straight is terrible for you. Preferably, you should take so-called "micro-pauses" every 25-30 minutes. I can be something as short as going to the bathroom, or getting a glass of water. Personally, I use a Pomodoro timer for this purpose.
Get up and stretch the hip flexor whenever you have a spare moment. A minute of stretching for every hour of sitting will go a long way towards correcting the tilt, and/or preventing it in the first place.
A good stretch that can easily be done anytime, anywhere, is the standing stretch.
If you have some extra time at home, there is also the dragon pose (yoga) which gives an even better stretch over the entire length of the hip flexor.
You can ease into this pose gradually. I suggest 3-4 minutes on each side for a good and deep stretch, releasing the tension of the connective tissue and the muscle. This can also be done daily.
Strengthen the hamstring and butt. Take small breaks often during a day of sitting. Stretch the hip flexors whenever possible, preferably several times per day.
On the whole, I'd suggest taking some beginner yoga classes, as you will get familiarized with a good stretching routine, which will really make a difference in the long run.