Running outline in any shape on hover

Can someone guide me where to start in making a running outline in any shape upon hover?