Probably by train,
National Rail Enquiries - Official source for UK train times and timetables.
If you're going to CTC at Whiteley, Swanwick is the nearest station. PLaces to stay depend on how rich you're feeling, there's a Holiday Inn in Fareham or the Solent Hotel in Whiteley which is a bit more, but closer.
There's plenty of other places to stay, have a look back through this thread and there's some recommendations