Destroy target permanent. Its controller creates a 3/3 green Beast creature token.
If the permanent is still a legal target but is not destroyed (perhaps because it regenerated or has indestructible), its controller still gets the Beast token.
If the permanent is an illegal target when Beast Within tries to resolve, the spell won’t resolve and none of its effects will happen. The permanent’s controller won’t get a Beast token.