Parenting is not for the faint of heart. You have to have a tremendous amount of patience.
You are right in the middle of a difficult / wonderful age.
He can walk run, climb, speak react, make choices.. That means he is his own little person..
He only has about a 2 to3 minute attention span.. Keep this in mind.. 2 to 3 minutes,, then he wants to move on and do something else.. You need to help with this. books, toys snacks, engaging him, making him a part of the situation.
Make sure he is rested. Make sure he is not hungry or thirsty.. Remember, just because you are eating lunch, does not mean he is hungry today like he was yesterday. He is his own little self. He has his own needs and wants. You need to know him well enough to understand what is going on with him.
To HELP him learn the RULES of behaviors takes dozens of times telling him and reinforcing these rules and expectations.
Children love rules. They like knowing you are aware when they break the rules and they like when you notice they did a good job with the rules.
Some children need to be told these behaviors are for all of the time, because they cannot understand.. "At home we do not run" also means, Oh yea.. we don't run in the store either. Oh and not the library..
Instead the rule needs to be.
"We do not run inside."
When we go outside in the yard, you can run in the yard. When we go to the park you can run in the playground.
This means every time.. until he is old enough to understand.. yes, you can run inside the gym.. Yes, you can run on the indoor playscape.. But right now, the rule is "We do not run inside." Say it over and over.. Make sure you and dad also follow this rule.
"We use inside voices. No screaming, no yelling inside."
This means even at home, even at the mall.. we use a inside voice.
You and dad also need to remember, we do not yell across the house. We walk to the person to speak with them.
"You need to hold my hand or ride in the basket. "
These are the only choices when you are out in public. When going into the store. you need to hold my hand in the parking lot. Do you want to ride in the grocery cart or hold my hand? Our rule was children always ride in the grocery cart, so they will not get hurt.. This is up to you.
When shopping, you have to hold my hand. Or you have to hold onto my shirt, pants, skirt.. whatever you are wearing.
Melt downs, disobeying is pick him up and leave.. Every time. You can either leave the store and have a conversation in the car or you can decide if he just needs to be taken home.
There were many times at this age, our daughter really just could not handle sitting for a 2 hour meal in a restaurant.. Just not going to happen..
I also used to make sure before we left the house she was prepped with what behaviors were expected. What we would be doing. And what was going to happen if she did not behave as expected.
Before we went any where that she was not going to be able to run and play, I let her run around the yard. Thy have a lot of energy that needs to be expelled.. If you can allow this beofre you leave, it will help them keep control while out.
The Most important part of all of this.. Is to Compliment him on following the rules. Do this at home as well as being out in public. Try to to this more then getting after him.. Children are pleasers.. they want you to be proud of them.
"Thank you for remembering to hold my hand!"
"I like how you are using your inside voice."
"I Iike how you are looking with your eyes and not with your hands."
"Thank you for letting mom talk to the lady. I like how you gave M. your patience. "