When children hit

Young children sometimes resort to hitting when they’re frustrated by a limitation and don’t know how to express themselves. How to respond?