Most 3 phase motors have a terminal block, with six terminals. The top 3 are the ends of U,V and W windings respectively (aka U1, V1, W1), and the bottom three are (note the order) V2, W2, U2.
For star connection, short V2, W2, and U2 together, apply actives to U1, V1, W1.
For delta connection, connect U1 to V2, V1 to W2, and W1 to U2. Apply actives to (U1/V2), (V1/W2), (W1/U2).